How to write table of any number in C++
To write table in C++ we use the for loop.
#include<iostream.h>
int main()
{
int number;
int end;
int c;
cout<<"enter the table number"<<endl;
cin>>number;
cout<<"enter the number of turns "<<endl;
cin>>end;
for(int b=1;b<=end;b++)
{
c=number*b;
cout<<number<<" * "<<b<<" = "<<c<<endl;
}
system("pause");
return 0;
}