-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUri1066.java
More file actions
33 lines (26 loc) · 786 Bytes
/
Uri1066.java
File metadata and controls
33 lines (26 loc) · 786 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import java.util.Scanner;
class Uri1066{
public static void main(String[] args){
int n = 0, par = 0, impar = 0, pos = 0, neg = 0;
Scanner teclado = new Scanner(System.in);
for(int i = 0; i <= 4; i++){
n = teclado.nextInt();
if((n % 2) == 0){
par++;
}
if((n % 2) != 0){
impar++;
}
if(n > 0){
pos++;
}
if(n < 0){
neg++;
}
}
System.out.println(par + " valor(es) par(es)");
System.out.println(impar + " valor(es) impar(es)");
System.out.println(pos + " valor(es) positivo(s)");
System.out.println(neg + " valor(es) negativo(s)");
}
}