C program for multiplication table , C/C++ Programming

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

 

 

Posted Date: 9/10/2012 2:11:11 AM | Location : United States







Related Discussions:- C program for multiplication table , Assignment Help, Ask Question on C program for multiplication table , Get Answer, Expert's Help, C program for multiplication table Discussions

Write discussion on C program for multiplication table
Your posts are moderated
Related Questions
Is it possible to have Virtual Constructor? If yes, how? If not, Why not possible?

A: If you employ auto_ptr objects you would not need to be concerned along with heap objects not being deleted even if the exception is thrown.


Differences between a pointer and a reference 1.  A reference must always point to some object where as this restriction is not imposed on a pointer. e.g. int *pi = 0;

Static Member Functions All the objects of the class share static data members of a class. The example above demonstrates how to keep track of all the objects of a class which

Program is to find the maximum from two numbers: Program is to find the maximum from two numbers entered by the user having pointer variable as parameter void main()   {

A string is said to be "Beautiful"€, if it contains only non repetitive alphabets

make a marksheet of 2 student with 5 subject

To develop a web crawler such that when given a base URL, it will traverse the entire web tree and then build an index of keywords and what URL link they appear on.   The web crawl

C program to demonstrate call by reference: void disp(int *,int*,int*,int*); void main() {                 int a=2,b=3, sum,mul;                 printf("Enter 1st n