-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogram216.java
More file actions
37 lines (28 loc) · 794 Bytes
/
Copy pathprogram216.java
File metadata and controls
37 lines (28 loc) · 794 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
34
35
36
37
import java.util.Scanner;
class program216
{
public static void main(String A[] )
{
Scanner sobj = new Scanner(System.in);
System.out.println("Enter number of elements :");
int iSize = sobj.nextInt();
int Arr[] = new int[iSize];
System.out.println("Enter the element :");
int iCnt = 0;
int iCount = 0;
for(iCnt = 0 ; iCnt < Arr.length ; iCnt++)
{
Arr[iCnt] = sobj.nextInt();
}
for(iCnt = 0 ; iCnt < Arr.length ; iCnt++)
{
if(Arr[iCnt] % 2 == 0)
{
iCount++;
}
}
System.out.println("Number of Even elements are : "+iCount);
Arr = null;
sobj = null;
}
}