Program to print multiplication table

0 Suresh Chand June 2, 2021

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.

Download Application: Learn C Programming with Live Compiler

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

Flowchart : Program to print multiplication table

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
Notify of
guest
0 Comments
Inline Feedbacks
View all comments

Join Our Newsletter Now

Get the latest tutorials, examples and projects updates.

!

Ads

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Disable Ad Block

Want Same System