import java.util.*;
import java.lang.*;
import java.io.*;
class Main {
public static void main(String[] args) {
// Exercício 1 - 7
/*Scanner teclado = new Scanner(System.in);
int poder;
int contador = 0;
poder = teclado.nextInt();
while (poder != 0){
if(poder >= 100 && poder <= 200){
contador++;
}
poder = teclado.nextInt();
}
System.out.println(contador);
}
} */
// Exercício 2 - 13
/*Scanner teclado = new Scanner(System.in);
int senha = 0;
int tentativas = 0;
while ( senha != 2014){
senha = teclado.nextInt();
tentativas++;
if (senha == 2014 ){
System.out.println("Acesso permitido com " + tentativas + " tentativas.");
break;
} else {
System.out.println("Acesso negado.");
}
}
}
} */
// Exercício 3 - 30
Scanner teclado = new Scanner(System.in);
int N = teclado.nextInt();
int negativos = 0;
int entre = 0;
int maior = 0;
for (int i = 0; i < N; i++){
int numero = teclado.nextInt();
if (numero < 0){
negativos++;
}
if(numero >=15 && numero <= 45){
entre++;
}
if(numero > 100){
maior++;
}
}
System.out.println(negativos);
System.out.println(entre);
System.out.println(maior);
teclado.close();
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: