#include <stdio.h>
int main() {
int num, rows, i;
// Taking input
printf("Enter the number: ");
scanf("%d", &num);
printf("Enter the number of rows: ");
scanf("%d", &rows);
// Printing multiplication table
for (i = 1; i <= rows; i++) {
printf("%d x %d = %d\n", num, i, num * i);
}
return 0;
}
Comments
Post a Comment