MULTIPLICATION TABLE IN DO WHILE LOOP
PROGRAM
import java.util.*;
class domultiplicationtable
{
public static void main()
{
int a,b=1;
Scanner sc=new Scanner(System.in);
System.out.print("Enter which table you want : ");
a=sc.nextInt();
do
{
System.out.println(a+" X "+b+" = "+(a*b));
b++;
}
while (b<=10);
}
}
OUTPUT
2 Comments
very nice program
ReplyDeleteGood
ReplyDelete