MULTIPLICATION TABLE USING DO WHILE

MULTIPLICATION TABLE USING DO WHILE

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

MULTIPLICATION TABLE 2

Post a Comment

2 Comments