C Program to Print Multiplication Table of Any Number ?
Q:- Write a C Program to Print Multiplication Table of Any Number ?
Input
#include<stdio.h>
#include<conio.h>
main()
{
int num,i=1,t=1;
clrscr();
printf(“Enter a Number to Print
Table =”);
scanf(“%d”,&num);
while(i<=10)
{
t=num*i;
i++;
printf(“%d*%d=%d\n”,num,i,t);
}
getch();
}
Output
Enter a
Number to Print Table = 2
2 *
1 = 2
2 *
2 = 4
2 *
3 = 6
2 *
4 = 8
2 *
5 = 10
2 *
6 = 12
2 *
7 = 14
2 *
8 =
16
2 *
9 = 18
2 *
10 = 20
Comments
Post a Comment