C Program to Generate Multiplication Table
Write a C Program to Create Multiplication Table ?
If you are looking for a C program to generate multiplication table.So, In this blog, we will help you to learn and how to write a program for multiplication table in C, and also the logic to print multiplication table of any given number in C program.Just go through this C programming tutorial to learn about multiplication table in C.
Enter any integer number as an input of which you want multiplication table. After that, we use for loop from one to ten to generate multiplication of that number.Inside for loop just multiply numbers and print result in each iteration.Now let’s have a look in a programmatic way
C Programming Code to print multiplication table:
#include<stdio.h>
int table( int num )
{
int i,sum=0;
for(num=1;num<=10;num++)
{
for(i=1;i<=10;i++)
{
sum=num*i;
printf(“sum=%d\n”,sum);
}
}
}
int main()
{
int n,table1;
table1=table(n);
return 0;
}
Let us know if you are stuck somewhere and need help.Send us your problem and we will publish the solution,We will try our best to provide you a solution to your problem. You are also free to request some other problem using our comments section.See our more C Programming Language.