April 13, 2019

C Program To Print Multiplication Table of any Number

The following is a C Program To Print Multiplication Table of any Number on screen after taking input from the user. Let's get started.

C Program To Print Multiplication Table of any Number
C Program To Print Multiplication Table

Overview:


Commands

scanf() function is used to obtain input and printf() function is used to print the string on the screen.
for() loop is used to undergo iteration process.

Program

#include<stdio.h>
#include<conio.h>
void main()
{
    int i,j,prod;
    clrscr();
    printf("Enter number whose table you want to print : ");
    scanf("%d",&i);
    printf("\nEnter the stopping limit : ");
    scanf("%d",&j);
    printf("\nTable of %d is as follows:\n\n",i);
    for(int n=1;n<=j;n++)
    {
       prod=i*n;
       printf("%d x %d = %d\n",i,n,prod);
    }
    getch();
}


Output

Multiplication Table Output
Multiplication Table Output

All programs compiled in this post are compiled in AnDOSBox.

Books I Prefer:






I hope this article was helpful to understand C Program To Print Multiplication Table of any Number! Comment below, if you've got any question. Head back soon for another interesting article on C Programming.