C Program to print the table of inputted number

Write a program in the C programming language to print the table of the inputted number. Below is the solution of the C program –

/* C Program to print the table of inputted number */
#include<stdio.h>
void main()
{
     int n,i,t;

     printf("Enter any number to print it's table \n");
     scanf("%d",&n);

     printf("\nTable of %d is - \n",n);
     for(i=1;i<=10;i++)
     {
             t=n*i;
             printf("%d x %d = %d \n",n,i,t);
     }
     getch();
}

Description – For loop is used to print the table.
Below is the output of the above program –

C program to print table

Table of inputted number

yashan has written 70 articles

2 thoughts on “C Program to print the table of inputted number

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>