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
Question: (a) What is a function? Are functions needed when writing a C program? (b) State one of the advantages to the use of functions. (c) What do you meant by underst

Define The Return Statement in Computer Programming? The return statement is used for two purposes once the return statement is executed the program control will be immediately

Write a Program to illustrate passing structure to function? # include struct customer { int id; char name[15]; }; void func_struct(struct customer); main() { struct c

At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with thes

types of lists

Write a program to calculate e^x using the formula: e^x = 1 + x/1! + x^2/2! + x^3/3! + ...... Allow the user to enter the integer number x, then do the calculation in a loop (for

program to write superposition of waves using class and objects

Threaded binary tree: Consider the linked illustration of a binary tree 'T.  Approximately half of the entries is the pointer fields 'LEFT' and 'RIGHT' will have null elements. Th

A: Use operator overloading to present a friend right-shift operator, operator>>. It is similar to the output operator, except the parameter doesn't contain a const: "Fred&" instea

Introduction:  This assignment requires a knowledge of variables (integers, char types), loops, conditionals, switch, functions, char arrays, string arrays, number arrays, struc