C Introduction
Control Statement
Functions
Array
Pointers
Structure and Union
No Examples found for this topic - CodeHelpPro
Data Files
No Examples found for this topic - CodeHelpPro
Program to print multiplication table
In this example, We will learn a program to print multiplication table. You must have knowledge of the following topics before looking at this example. This is the simple program where we will use for the loop.
Algorithm
This is the algorithm of this program
Step 1: Start Step 2: Initialize vraibles n and i Step 3: Take input from user and store in n Step 4: Assign i = 1 Step 5: REPEAT this step until i <= 10 Print n * 1 Increase i by 1 Step 6: End
Flowchart
This is the flowchart of this program

CODE: Program to print multiplication table
Now, We will see the code to find multiplication table
#include<stdio.h>
int main()
{
int n,i;
printf("Table of: ");
scanf("%d", &n);
for(i = 1; i <= 10; i++)
{
printf("\n\t%d * %d = %d \n", n, i, n*i);
}
return 0;
}
The output of above program is
Table of: 12
12 * 1 = 12
12 * 2 = 24
12 * 3 = 36
12 * 4 = 48
12 * 5 = 60
12 * 6 = 72
12 * 7 = 84
12 * 8 = 96
12 * 9 = 108
12 * 10 = 120
Subscribe
Login
0 Comments
Inline Feedbacks
View all comments