C++ program to print table of any number.

 

Table of any number is multiply particular number from 1 to 10.

 

Step 1: Let’s open turboC++ and write the following Code:

 

// Code:

 

#include<conio.h>

#include<iostream.h>

void main()

{

long int a,i,result;

clrscr();

cout<<”enter any number:”;

cin>>a;

for(i=1;i<=10;i++)

{

result=a*i;

cout<<”\n”<<result;

}

getch();

}

 

 

Step 2: Run the program and see Output:

 

 

Output:

 

 

output

 

Happy coding.

 

 

Tags: , , , ,