Program: 108
Write a c program to print the multiplication table of the number entered by the user. The table should get displayed in the following form:
29 x 1 = 29
29 x 2 = 58
#include<stdio.h> #include<conio.h> int main() { int i=1, num; printf("Enter number: "); scanf("%d", &num); while(i!=11) { printf("%d x %d = %d\n",num,i, num*i); i++; } }
Output:
Enter number: 29 29 x 1 = 29 29 x 2 = 58 29 x 3 = 87 29 x 4 = 116 29 x 5 = 145 29 x 6 = 174 29 x 7 = 203 29 x 8 = 232 29 x 9 = 261 29 x 10 = 290
Leave a Comment