#include <stdio.h>
int main(){
//declaring variables
int n,i,a,start,end;
//taking and printing the instructions
printf("Enter first number from where you want to start multiplication :
");
scanf("%d",&start);
printf("Enter Last number from where you want to end multiplication :
");
scanf("%d",&end);
//using loops
for(n=start;n<=end;n++){
a=0;
for(i=1;i<=10;i++){
a+=n; //setting the value of a. i used addition instead of multiplication
//because computer takes too much time for multiplating numbers than doing addition
printf("%d x %d = %d
",n,i,a);
}
printf("Multiplication has ended of %d
",n);
}
return 0;
}
#include <stdio.h>
int main()
{
int namta[11][10]; //programme will run upto 11 multiplication tables, each table has 10 columns
int i,j;
for(i = 1; i <= 11; i++)
{
for(j = 1; j <= 10; j++)
{
namta[i][j] = i * j; //getting the multiplating value into the array
}
}
for(i = 1; i <= 10; i++){
for(j = 1; j <= 10; j++){
printf("%d x %d = %d
",i,j,namta[i][j]); //printing the array of results calculated in the previous loops
}
printf("
");
}
return 0;
}
a program to print the multiplication table of a given number in c
int n, i;
printf("Enter a number: ");
scanf("%d", &n);
printf("Multiplication table of %d:
", n);
for (i = 1; i <= 10; i++){
printf("%d x %d = %d
", n, i, n * i);
}
return 0;