C++ Program to Print Table of Number

« Previous Program Next Program »

Print Table of Number in C++

To print table of a 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 on the output screen which is the table of the number as shown here in the following program.

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 Number */
void main()
	int num, i, tab;
	cout<<"Enter a number : ";
	cout<<"Table of "<<num<<" is \n\n";
	for(i=1; i<=10; i++)
		cout<<num<<" * "<<i<<" = "<<tab<<"\n";

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 Language

You may like the same program in other programming languages:

« Previous Program Next Program »


Quick Links
Signup - Login - Give Online Test