-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathepisode-7.java
34 lines (23 loc) · 916 Bytes
/
episode-7.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
import java.util.Random;
import java.util.Scanner;
public class main {
public static void main(String[] args) {
Scanner in = new Scanner (System.in);
Random r = new Random();
int NumberZugi = 0, NumberNotZugi =0 ;
int[] grades = new int[100];
for(int i = 0; i<grades.length; i++){
grades[i] = r.nextInt(100) + 1;
}
for(int i=0 ; i<grades.length ; i++){
System.out.println(grades[i]);
if(grades[i] % 2 == 0){
NumberZugi++ ;
} else{ NumberNotZugi++;
}
}
System.out.println(" the number zugi is: " + NumberZugi );
System.out.println( "the number is not zugi is " + NumberNotZugi);
in.close();
}
}