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
replace character into string and return value of string that are replaced

Should my constructors employ "assignment" or "initialization lists"?

What is Structure? An Array is a data structure whose elements are all of the similar data type. The structure is a data structure whose individual elements are able to differ

Explain Register Variable Computers have internal registers, which are used to keep data temporarily, before any operation can be performed. Intermediate results of the calcula

Cross Platform Clinet app for a vpn Project Description: We want a cross platform client app for VPN. The app must have the subsequent options below: 1. Must be an open

Default argument: When the argument is missing then the function will read the default value of the missing argument.  To make use of default argument functionality the argu

C Program for MAXIMUM NO, MINIMUM NO AND SORTING   void main() {           int i,j,t;           int a[5];           clrscr();           for(i=0;i

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

compose a C program to solve the equation z2=(p1/Pg)+(v1^2/2g)+z1 p1=100kpa,v1=2m/s z1=3m P=1000kg/m^3 define g=9.81