C Program to Print Multiplication Table of m up to n using For Loop
Write a Program to Print Multiplication Table of m up to n using For Loop
// C Program to Print Multiplication Table of m up to n using For Loop
#include <stdio.h>
int main()
{
int m, n, i;
printf("Enter m :--> ");
scanf("%d", &m);
printf("Enter n :--> ");
scanf("%d", &n);
for(i= 1; i <= n; i++)
{
printf(" %d * %d = %d\n", m, i, m*i);
}
return 0;
}
Output:
Enter m :--> 7
Enter n :--> 13
7 * 1 = 7
7 * 2 = 14
7 * 3 = 21
7 * 4 = 28
7 * 5 = 35
7 * 6 = 42
7 * 7 = 49
7 * 8 = 56
7 * 9 = 63
7 * 10 = 70
7 * 11 = 77
7 * 12 = 84
7 * 13 = 91