please i have problem with run import java.util.*; public class Main{ public static void main(String args[]) { int[][] Arr=new int[2][3]; Random r=new Random(); for(int i=0;i<2;i++) { for(int j=0;j<3;j++) { Arr[i][j]=r.nextInt(100); } } System.out.println("Elements in the array:\n"); for(int i=0;i<2;i++) { for(int j=0;j<3;j++) { System.out.print(Arr[i][j]+","); } System.out.println(); } System.out.println("\nElements in the array after adding 8:\n"); for(int i=0;i<2;i++) { for(int j=0;j<3;j++) { Arr[i][j]+=5; System.out.print((Arr[i][j])+","); } System.out.println(); } System.out.println("\nElement at Arr[2][3]: "+Arr[1][3]); } }
please i have problem with run
import java.util.*;
public class Main{
public static void main(String args[]) {
int[][] Arr=new int[2][3];
Random r=new Random();
for(int i=0;i<2;i++) {
for(int j=0;j<3;j++) {
Arr[i][j]=r.nextInt(100);
}
}
System.out.println("Elements in the array:\n");
for(int i=0;i<2;i++) {
for(int j=0;j<3;j++) {
System.out.print(Arr[i][j]+",");
}
System.out.println();
}
System.out.println("\nElements in the array after adding 8:\n");
for(int i=0;i<2;i++) {
for(int j=0;j<3;j++) {
Arr[i][j]+=5;
System.out.print((Arr[i][j])+",");
}
System.out.println();
}
System.out.println("\nElement at Arr[2][3]: "+Arr[1][3]);
}
}
Step by step
Solved in 2 steps with 2 images