Can someone check my code im getting the right answer but it said i need to use a while loop and I am
package com.codegym.task.task04.task0434;
/*
Multiplication table
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
int i=1;
int arr[] = new int[10];
while (i<=10){
for(int x= 0;x<10;x++){
arr[x]=(x+1)*i;
}
for(int y = 0;y<10;y++){
System.out.print(arr[y] + " ");
}
System.out.println(" ");
i++;
}
//write your code here
}
}