/** C Program to Print Multiplication Table of a given Number **/
#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(); )
perfect
ReplyDeletenice article.thank you.
ReplyDeleteweb programming tutorial
welookups