Generalized form to write table of a range :bs2:
Code:
#include <iostream>
using namespace std;
int tableof;
int tableto;
int counter=1;
int main()
{
cout<<"Enter the Number from which You want to start Table:";
cin>>tableof;
cout<<"Enter the Number UPTO which You want to Write the Table:";
cin>>tableto;
while(tableof<=tableto)
{
cout<<endl<<"Table of "<<tableof<<endl;
while(counter<=10)
{
cout<<tableof<<"x"<<counter<<"="<<tableof*counter<<endl;
counter++;
}
tableof++;
counter=1;
}
return 0;
}