-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathURI_1066.java
41 lines (32 loc) · 845 Bytes
/
URI_1066.java
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
34
35
36
37
38
39
40
41
import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
Scanner scanner = new Scanner(System.in);
int input,even=0,odd=0,positive=0,neg=0;
for(int i=0; i<5; i++)
{
input=scanner.nextInt();
if( input%2==0)
{
even++;
}
if( input%2==1 || input%2==-1)
{
odd++ ;
}
if( input>0)
{
positive++;
}
if( input<0 )
{
neg++;
}
}
System.out.printf("%d valor(es) par(es)\n",even);
System.out.printf("%d valor(es) impar(es)\n",odd);
System.out.printf("%d valor(es) positivo(s)\n",positive);
System.out.printf("%d valor(es) negativo(s)\n",neg);
}
}