Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scanner leer=new Scanner (System.in);
- Integer x,pares;
- double nota,prom,multi;
- System.out.println("Diagrama que calcula la caca que esta arriba");
- x=1;
- prom=0;
- multi=1;
- pares=0;
- while (x<=5)
- {
- System.out.println("Proporciona la nota");
- nota=leer.nextDouble();
- if (nota % 2==0)
- {
- pares=pares+1;
- }
- prom=prom+nota;
- if (nota<6)
- {
- multi=multi*nota;
- }
- x++;
- }
- prom=(prom/5);
- System.out.println("Las notas pares fueron "+pares+" El promedio es "+prom+" y la multipliación es "+multi);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement