Print Table Program in C

In this section you will learn how to print a table of given number. Here we will apply multiplication operation to print the table. We will take the input from user.

Table Program

How program will work?

Program of print table in c.


	#include<stdio.h>
	#include<conio.h>
		
	//PRINT A TABLE PROGRAM.
	void main()
	{
		int i, num, sum;
		clrscr();
		
		printf("ENTER A NUMBER TO PRINT A TABLE:- ");
		scanf("%d",&num);
		
		for(i=1; i<=10; i++)
		{
			sum=i*num;
			printf("%d\n",sum);
		}
		
		getch();		
	}
	

Output:


	ENTER A NUMBER TO PRINT A TABLE:- 2
	2
	4
	6
	8
	10
	12
	16
	18
	20

Post Your Comment