We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a04b840 commit 9363826Copy full SHA for 9363826
Section8LoopAB/Loop 2.O/src/A2.java
@@ -0,0 +1,28 @@
1
+import java.util.Scanner;
2
+
3
+class A2
4
+{
5
+ public static void main(String[] args)
6
+ {
7
+ Scanner sc = new Scanner(System.in);
8
+ int n;
9
+ System.out.println("Enter size of the Array");
10
+ n = sc.nextInt();
11
+ int [] A = new int[n];
12
+ System.out.println("Enter n elements of");
13
14
+ for(int i =0; i<A.length; i++)
15
16
+ A[i] = sc.nextInt();
17
+ }
18
19
+ System.out.println("Even Numbers are: ");
20
+ for(int i = 0; i<A.length; i++)
21
22
+ if(A[i]%2==0)
23
24
+ System.out.println(A[i]);
25
26
27
28
+}
0 commit comments