Untitled
Anonymous
Plain Text
03/09/2026 6:24 AM
584 B
10
Indexable
Never
package program;
import java.util.Scanner;
public class TwoD {
public static void main(String []args) {
int a[][]=new int[3][3];
Scanner sc=new Scanner(System.in);
System.out.print("Enter the Array elements : ");
for(int i = 0 ; i< 3; i++) {
for(int j=0 ; j< 3 ; j++ ) {
a[i][j]=sc.nextInt();
}
}
System.out.println("Array elements Are :");
for(int[] x : a) {
for(int s : x) {
System.out.print(" "+s);
}
System.out.println();
}
sc.close();
}
}
Editor is loading...
Leave a Comment