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 74492b3 commit 7acd0bcCopy full SHA for 7acd0bc
oneD-array.java
@@ -0,0 +1,20 @@
1
+import java.util.Scanner;
2
+class oneD_array {
3
+ public static void main(String[] args)
4
+ {
5
+ Scanner s=new Scanner(System.in);
6
+ int i;
7
+ System.out.println("Enter the size of the Array:");
8
+ int n=s.nextInt();
9
+ int[] arr = new int[50];
10
+
11
+ System.out.println("Enter the Array elemenst:");
12
+ for (i = 0; i <n; i++)
13
14
+ arr[i]=s.nextInt();
15
+ }
16
+ System.out.println("The Array elements you entered are:");
17
18
+ System.out.print(arr[i]+" ");
19
20
+}
0 commit comments