codescracker


c

C Program to Print Table of Number



« Previous Program Next Program »


Print Table of Number in C

To print the table of any number in C programming, you have to ask to the user to enter a number and start multiplying that number from 1 to 10 and display the multiplication result at the time of multiplying

C Programming Code to Print Table of Number

Following C program ask to the user to enter any number to find the table of that number, then display it on the screen :

/* C Program - Print Table of a Number */
		
#include<stdio.h>
#include<conio.h>
void main()
{
	clrscr();
	int num, i, tab;
	printf("Enter a number : ");
	scanf("%d",&num);
	printf("Table of %d is \n\n",num);
	for(i=1; i<=10; i++)
	{
		tab=num*i;
		printf("%d * %2d = %2d\n",num, i, tab);
	}
	getch();
}

When the above c program is compile and executed, it will produce the following result:

c program print table of number

Same Program in Other Programming Language

You may also like same program in other programming languages:


« Previous Program Next Program »



Tools
Calculator

Quick Links
Signup - Login - Give Online Test