Code
// WAP to print multiplication table of a given number... #include <stdio.h> int main() { int n; printf("Enter a number \n"); scanf("%d", &n); printf("***Multiplication table of %d is***\n\n", n); for (int i = 1; i <= 10; i++) { printf("%d X %d = %d\n", n, i, n * i); } return 0; }
Output
Enter a number 5 ***Multiplication table of 5 is*** 5 X 1 = 5 5 X 2 = 10 5 X 3 = 15 5 X 4 = 20 5 X 5 = 25 5 X 6 = 30 5 X 7 = 35 5 X 8 = 40 5 X 9 = 45 5 X 10 = 50