luc034.c (485B)
1 /* Write a program to print the multiplication table of the number 2 entered by the user. The table should get displayed in the following 3 form : 4 29 * 1 = 29 5 29 * 2 = 58 6 */ 7 /* Let Us C, Chap- 6, Page - 105, Qn No.: B(a) */ 8 9 #include <stdio.h> 10 int main() 11 { 12 int i, num, res; 13 printf("Enter the number : "); 14 scanf("%d", &num); 15 printf("\n--- Multiplication Table ---\n"); 16 for (i = 1; i <= 10; i++) 17 printf("%d * %d = %d\n", num, i, num * i); 18 return 0; 19 }