C Program to Print Multiplication Table of a given Number
/** C Program to Print Multiplication Table of a given Number **/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
#include<stdio.h> //#include<conio.h> void main() { int num,i; //clrscr(); printf("\n >>> PROGRAM TO PRINT MULTIPLICATION TABLE <<<"); printf("\n Enter the Number: "); scanf("%d",&num); printf("\n %d Multiplication Table",num); printf("\n ----------------------"); for(i=1;i<=10;i++) //printing upto 10.. { printf("\n %d * %d = %d",num,i,(num*i)); //the product of entered num and i value } printf("\n\n"); //getch(); } |
Sample Output :
( using GNU GCC Compiler with code::blocks IDE, hence no need of clrscr(); and getch(); )