Categorías: Todo - input - menu

por Valeria Perlaza hace 3 años

235

Scanner dato = new Scanner (System.in); System.out.println ("ÁREAS DE FIGURAS GEOMÉTRICAS");

A program prompts users to select and calculate the area of different geometric shapes. It presents a menu with options for the area of a trapezoid, triangle, rectangle, and circle.

Scanner dato = new Scanner (System.in); System.out.println (

Scanner dato = new Scanner (System.in); System.out.println ("ÁREAS DE FIGURAS GEOMÉTRICAS");

To name your story, you have to think about the overall message and what you want your audience to understand from the story. Also, make it relevant and easy to remember.

System.out.println ("MENÚ"); System.out.println ("1)Área del trapecio"); System.out.println ("2)Área del triángulo"); System.out.println ("3)Área del rectángulo"); System.out.println ("4)Área del círculo");

In the beginning of the story (or the exposition), you will need to introduce the setting and characters. You might also want to introduce the main conflict. This part of the story is important because it gives the reader necessary background information and maybe even a first insight into a character’s personality.

System.out.println ("INGRESE EL NÚMERO DE LA OPCIÓN A REALIZAR"); opcion=dato.nextInt(); switch(opcion){

The setting (time & place) of a story can change throughout the plot.

case 4: System.out.println("Área del círculo");

Sensory details include sight, sound, touch, smell, and taste. These details are important because they create depth in your setting.
See a few examples below:

resp=Math.PI*Math.pow(x,2); System.out.println("La respuesta es:"+resp); break; default: System.out.println("Ingresar solo números del 1 al 4"); }

System.out.println("Ingrese el valor del radio"); x=dato.nextDouble();

case 3: System.out.println("Área del rectángulo");

resp=x*y; System.out.println("La respuesta es:"+resp); break;

case 2: System.out.println("Área del triángulo");

The time of the story can also change. It can describe the event of a single day or can include an entire year's plot. Anyway, don't forget to mention it.

resp=(x*y)/(2); System.out.println("La respuesta es:"+resp); break;

System.out.println("Ingrese el valor de la base"); x=dato.nextDouble(); System.out.println("Ingrese el valor de la altura"); y=dato.nextDouble();

case 1: System.out.println("Área del trapecio");

Your story can take place wherever your imagination will take you to.
For example: in an elevator, in an enchanted forest, etc. Don't forget to give details of the environment each time the setting changes, otherwise, the story can be confusing. Also, mention the seasons as each of them has unique weather and events.

resp=(x*(z*y))/(2); System.out.println("La respuesta es:"+resp); break;

System.out.println("Ingrese el valor de la altura"); x=dato.nextDouble(); System.out.println("Ingrese el valor de la base menor"); y=dato.nextDouble(); System.out.println("Ingrese el valor de la base mayor"); z=dato.nextDouble();

int opcion; double x,y,z,resp;