0

how can i write given number table using frame in java

suppose we write table of 2 like 2×1=1 2×2=4 etc so

16th Feb 2017, 2:47 PM
Rahul Vichare
Rahul Vichare - avatar
2 odpowiedzi
0
what do you mean by "using frame"?
28th Feb 2017, 7:16 AM
Meharban Singh
Meharban Singh - avatar
0
for(int a=1;a<=10; a++){ System.out.println("2 × " + a + "=" + (2*a)); } This would do the trick. If you want table of any number, use Scanner to get input and then the same code as above but replace last line by System.out.println(b + " × " + a + "=" + (b*a)); where b is the variable that stores input.
28th Feb 2017, 7:20 AM
Meharban Singh
Meharban Singh - avatar