+ 1

how to code multiplication table?

forloop inside the forloop the output is like this 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 until 10 and 100

25th Sep 2016, 12:10 AM
Kenneth Arcilla Ordoña
Kenneth Arcilla Ordoña - avatar
4 Respostas
0
Dead easy question.... using for loop ..for(i=1;i<=10;i++) { int a; //user input k bro; SYSTEM.OUT.PRINTLN( "a*"+a+"i"+I+"="+(a*i));} for n numbers of input
25th Sep 2016, 3:51 AM
V RAMESH RAJU
V RAMESH RAJU - avatar
0
import java.util.Scanner; public class Program { public static void main(String[] args) { int n,i; Scanner scan=new Scanner(System.in); System.out.println("Enter number of which you want table"); n=scan.nextInt(); for(i=1;i<=10;i++) { System.out.println(n+"*"+i+"="+(n*i)); } } }
25th Sep 2016, 3:54 AM
preet
preet - avatar
0
public class Program { public static void main(String[] args) { int i,j; for(i=1;i<=10;i++) { for(j=1;j<=10;j++) { System.out.print(" " + i*j); } System.out.println(); } } }
25th Sep 2016, 6:58 PM
omri nitecki
omri nitecki - avatar
0
How to convert it using while loop
23rd Jan 2023, 1:09 PM
Crystal Jean Sipin
Crystal Jean Sipin - avatar