In this demo I have used NetBeans IDE 8.2 for debugging purpose. But you can use any java programming language compiler as per your availability..
import java.util.Scanner;
public class JavaExcercise {
public static void main(String[] args)
{
int j,num;
{
System.out.print("Enter number of terms : ");
Scanner in = new Scanner(System.in);
num = in.nextInt();
System.out.println ("\n");
for(j=0;j<=num;j++)
System.out.println(num+" X "+j+" = " +num*j);
}
}
}
In this demo I have used NetBeans IDE 8.2 for debugging purpose. But you can use any java programming language compiler as per your availability..
Result:
Enter number of terms : 10
10 X 0 = 0
10 X 1 = 10
10 X 2 = 20
10 X 3 = 30
10 X 4 = 40
10 X 5 = 50
10 X 6 = 60
10 X 7 = 70
10 X 8 = 8010 X 9 = 90
10 X 10 = 100
need an explanation for this answer? contact us directly to get an explanation for this answer