Write a C program to print Multiplication Table

Program:-

#include<stdio.h>
main()
{
int i,num,end;
printf("Enter a number for which you want table\n");
scanf("%d",&num);
printf("Enter a number till where \nyou want multiplication with %d\n",num);
scanf("%d",&end);
printf("Multiplication table of %d is\n",num);
for(i=1;i<=end;i++)
{
printf("%d x %d = %d\n",num,i,num*i);

}

}

Output:-

Enter a number for which you want table
25
Enter a number till where
you want multiplication with 25
10
Multiplication table of 25 is
25 x 1 = 25
25 x 2 = 50
25 x 3 = 75
25 x 4 = 100
25 x 5 = 125
25 x 6 = 150
25 x 7 = 175
25 x 8 = 200
25 x 9 = 225
25 x 10 = 250

Post a Comment

0 Comments