I have this code which is giving me error, I have no idea how to fix it. I don't know which part I'm doing wrong.
I have made a code like this but with out giving user a option, for example:
int counter;
for (counter=1; counter<=100000; counter=counter+1)
{
cout<<"2x"<<counter<<"="<<2*counter<<"\n";
this code is giving me a table of 2.
#include <iostream>
#include <cstdlib>
using namespace std;
main()
{ int counter, number, maxMultiplier;
{
cout>> "Please enter the number for which you want a table: ";
cin<< number;
cout>> "Please select the multiplier up to which you want a table: ";
cin>> maxMultiplier;
}
for (counter=1; counter<=maxMultiplier; counter=counter+1)
{ cout<<number<<"x"<<counter<<"="<<number*counter<<"/n";
}
{system("pause");}
return main();
}
The user should be able to enter the number for table they want and how long they wants a table to be. Like all the way up to 2x1=2.........2x10=20