Problem: Program to display multiplication table of a given number.
Given a number, n, you need to print multiplication table. A multiplication table is created by multiplying a constant number from 1 to a given range of numbers
#include<stdio.h>
int main() {
int n, range;
scanf("%d",&n);
scanf("%d",&range);
for(int i=1;i<=range;i++){
printf("%d * %d = %d\n",n,i,n*i);
}
return 0;
}
int main() {
int n, range;
scanf("%d",&n);
scanf("%d",&range);
for(int i=1;i<=range;i++){
printf("%d * %d = %d\n",n,i,n*i);
}
return 0;
}