title: Just stuck in this code, I have to create a math table
body: <p>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.</p>
  
  <p>I have made a code like this but with out giving user a option, 
  for example: </p>
  
  <pre><code>int counter;
      for (counter=1; counter&lt;=100000; counter=counter+1)
      {
          cout&lt;&lt;"2x"&lt;&lt;counter&lt;&lt;"="&lt;&lt;2*counter&lt;&lt;"\n";
  </code></pre>
  
  <p>this code is giving me a table of 2.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;cstdlib&gt;
  
  using namespace std;
  
  main()
  {       int counter, number, maxMultiplier;
      {
          cout&gt;&gt; "Please enter the number for which you want a table: ";
          cin&lt;&lt; number;
          cout&gt;&gt; "Please select the multiplier up to which you want a table: ";
          cin&gt;&gt; maxMultiplier;    
      }
      for (counter=1; counter&lt;=maxMultiplier; counter=counter+1)
      {   cout&lt;&lt;number&lt;&lt;"x"&lt;&lt;counter&lt;&lt;"="&lt;&lt;number*counter&lt;&lt;"/n";
          }
      {system("pause");}
      return main();
  }
  </code></pre>
  
  <p>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</p>