c program for multiplication table


C Program for MULTIPLICATION TABLE

 

main()

{

          int a, b=1, c, d;

          char ch;

          clrscr();

          while(ch!='n')

          {

                   printf("ENTER THE NO. WHICH TABLE DO YOU WANT?: ");

                   scanf("%d",&a);

                   printf("ENTER MAX. NO.: ");

                   scanf("%d",&c);

          }

          while(b<=c)

          {

                   d=a*b;

                   printf("%d * %d = %d\n",a, b, d);

                   b=b+1;

          }

          printf("DO YOU WANT TO CONTINUE?\n");

          flushall();

          scanf("%c",&ch);

          if(ch=='n')

          {

                   printf("BYE...BYE...\n");

          }

          getch();

}

 

OUTPUT :

 ENTER NO: 4

ENTER THE MAX NO: 5

4 * 1 = 4

4 * 2 = 8

4 * 3 = 12

4 * 4 = 16

 

 

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: c program for multiplication table
Reference No:- TGS0159288

Expected delivery within 24 Hours