MULTIPLICATION TABLE USING FOR LOOP

MULTIPLICATION TABLE USING FOR WHILE


MULTIPLICATION TABLE USING FOR LOOP


PROGRAM


import java.util.*;
class formultiplicationtable
{
public static void main()
{
int a,b;
Scanner sc=new Scanner(System.in);
System.out.print("Enter which table you want : ");
a=sc.nextInt();
for (b=1;b<=10;b++)
System.out.println(a+" X "+b+" = "+(a*b));
}
}
OUTPUT

MULTIPLICATION TABLE

Post a Comment

0 Comments