About Lesson
Print the Multiplication Table using a For Loop.
#include <stdio.h>
int main() {
int num;// Taking input for the number
printf(“Enter a positive integer: “);
scanf(“%d”, &num);// Printing the multiplication table for the given number using a for loop
for (int i = 1; i <= 10; i++) {
printf(“%d x %d = %dn”, num, i, num * i);
}return 0;
}