Pages

Friday, May 19, 2017

Multiplication Table

C Program to Print Multiplication Table of a given Number.

#include<stdio.h>
int main()
{
 int i, table_number;

 printf("Enter Table Number to be printed: ");
 scanf("%d",&table_number);

 printf("\n Multiplication Table of %d",table_number);
 printf("\n --------------------------");

 for(i=1;i<=10;i++)
 {
     printf("\n %d * %d =  %d",table_number,i,(table_number*i));
 }
 return 0;
}

Output of program


No comments:

Post a Comment