Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ejercicio7;
- import java.util.*;
- /**
- *
- * @author Usuario
- */
- public class Ejercicio7 {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- // TODO code application logic here
- Scanner tecla=new Scanner (System.in);
- int asd[]= new int[100];
- int meno=0, mayo=0, comp=0, i=0;
- for (i=1;i<=100;i++){
- System.out.println("Escriba el valor del numero: "+i);
- asd[i]= tecla.nextInt();
- if (asd[i]<15){
- meno++;
- }
- if (asd[i]>50){
- mayo++;
- }
- if (asd[i]>45 && asd[i]<50){
- comp++;
- }
- }
- System.out.println("La canidad de numero menores a 15 es:"+meno);
- System.out.println("La cantidad de numeros mayores es igual a: "+mayo);
- System.out.println("La cantidad de numeros que estan entr 45 y 55 son: "+comp);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement