Thursday 3 October 2013

Displaying Multiplication table of any number using C

#include<stdio.h>
main()
{
int num,i;
printf("Enter the number for which multiplication table is to be displayed:\t");
scanf("%d",&num);
printf("Multiplication table for %d is as follows:\n",num);
for(i=1;i<=10;i++)
{
printf("%d * %d = %d \n",num,i,num*i);
}
}

No comments:

Post a Comment