Write a program that generates a table of any number

Program that generates a table of any number

Write a program that generates a table of any number

 

Object: Write a program that generates a table of any number. C++ Projects.

Code:

#include<iostream>
#include<conio.h>
using namespace std;
void main()
{
int no,i,tab;
cout<<” :Table Generator:\n\n”;
cout<<“Enter Any Number: “;
cin>>no;
for(i=1;i<=10;i++)
{
tab=no*i;
cout<<no<<” * “<<i<<“= “<<tab<<endl;
}
getch();
}

#include<iostream>
#include<conio.h>
using namespace std;
void main() 
{
	int no,i,tab;
	cout<<" :Table Generator:\n\n";
	cout<<"Enter Any Number: ";
	cin>>no;
	for(i=1;i<=10;i++)
	{
		tab=no*i;
		cout<<no<<" * "<<i<<"= "<<tab<<endl;
	}
	getch();
}

Output:

Program that generates a table of any number

C++ projects for beginners with source code

1 thought on “Write a program that generates a table of any number”

  1. Pingback: Write a C++ Program to display Box shape using for loop.

Leave a Comment

Your email address will not be published. Required fields are marked *