Please disable your adblock and script blockers to view this page
 

C++ Language program to print table of entered number using For loop

Introduction: In this article i will explain with example program to print table of any entered number using for loop in C++ Language.

Implementation: Let's create a program to print table using C++ Language.

#include<conio.h>
#include<iostream.h>
void main()
{
 int num,i,table=0;

 clrscr();
 cout<<"Enter any number: ";
 cin>>num;
  for(i=1;i<=10;i++)
   {
     table=num*i;
     cout<<num<<" * "<<i<<" = "<<table<<endl;
   }
 getch();
  • Run the program using Ctrl+F9
Output:

Enter any number: 7

7 * 1 = 7
7 * 2 = 14
7 * 3 = 21
7 * 4 = 28
7 * 5 =35
7 * 6 = 42
7 * 7 = 49
7 * 8 = 56
7 * 9 = 63
7 * 10 = 70

Now over to you:
"If you like my work; you can appreciate by leaving your comments, hitting Facebook like button, following on Google+, Twitter, Linked in and Pinterest, stumbling my posts on stumble upon and subscribing for receiving free updates directly to your inbox . Stay tuned and stay connected for more technical updates."
Previous
Next Post »

If you have any question about any post, Feel free to ask.You can simply drop a comment below post or contact via Contact Us form. Your feedback and suggestions will be highly appreciated. Also try to leave comments from your account not from the anonymous account so that i can respond to you easily.. ConversionConversion EmoticonEmoticon