Multiplication Table using C program
Amit Waghmare
January 04, 2020
C program to print Multiplication Table
Hello, In this blog we see the c program code to print multiplication table. In this program user give the input and depends on that integer number the multiplication table will displayed.
Code:
#include<stdio.h>
#include<conio.h>
void main()
{
int s,i,a;
clrscr();
printf("Enter the number to print the multiplication table: ");
scanf("%d",&s);
printf("\n");
for(i=1; i <= 10; i++)
{
printf("%d",s);
printf(" * ");
printf("%d",i);
a=s*i;
printf("=%d",a);
printf("\n");
}
getch();
}
#include<conio.h>
void main()
{
int s,i,a;
clrscr();
printf("Enter the number to print the multiplication table: ");
scanf("%d",&s);
printf("\n");
for(i=1; i <= 10; i++)
{
printf("%d",s);
printf(" * ");
printf("%d",i);
a=s*i;
printf("=%d",a);
printf("\n");
}
getch();
}
In the above code we use variable 's' to store the input value. And by using for loop the actual multiplication table is displayed.
Output:
Multiplication Table using C program
Reviewed by Amit Waghmare
on
January 04, 2020
Rating:
Reviewed by Amit Waghmare
on
January 04, 2020
Rating:














