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(); }
Pingback: Write a C++ Program to display Box shape using for loop.