title: Trying to output 10 lines using for loop
body: <p>I'm trying to get the following output when entering a number into the program:</p>
  
  <p><a href="http://i.imgur.com/POIlhb2.png" rel="nofollow">http://i.imgur.com/POIlhb2.png</a></p>
  
  <p>But I only get one line instead of all ten.
  Can someone walk me through this?
  Thank you.
  My code below:</p>
  
  <hr>
  
  <pre><code>#include "stdafx.h"
  #include &lt;iostream&gt;
  #include &lt;cmath&gt;
  #include &lt;iomanip&gt;
  using namespace std;
  
  int _tmain(int argc, _TCHAR* argv[])
  {
  char ans='y';
  int num = 0;
  while (ans=='y' || ans=='Y')
  {
  system("cls");
  system("color f0");
  cout&lt;&lt;"\t\t\t****************************************"&lt;&lt;endl;
  cout&lt;&lt;"\t\t\t*                                      *"&lt;&lt;endl;
  cout&lt;&lt;"\t\t\t*                                      *"&lt;&lt;endl;                   
  cout&lt;&lt;"\t\t\t*      Square-Cube Program             *"&lt;&lt;endl;
  cout&lt;&lt;"\t\t\t****************************************\n"&lt;&lt;endl;
  cout&lt;&lt;"Please enter a number to square,cube, and raise to the 4th power: ";
  cin&gt;&gt;num;
  cout&lt;&lt;"\t"&lt;&lt;"Number"&lt;&lt;"\t"&lt;&lt;"Square"&lt;&lt;"\t"&lt;&lt;"Cube"&lt;&lt;"\t"&lt;&lt;"4th Power"&lt;&lt;endl;
  cout&lt;&lt;"\t"&lt;&lt;"------"&lt;&lt;"\t"&lt;&lt;"------"&lt;&lt;"\t"&lt;&lt;"----"&lt;&lt;"\t"&lt;&lt;"---------"&lt;&lt;endl;
  for(int num=0; num&lt;100; num++,num+=5){
      cout&lt;&lt;"\t"&lt;&lt;num&lt;&lt;"\t"&lt;&lt;pow(num,2.0)&lt;&lt;"\t"&lt;&lt;pow(num,3.0)&lt;&lt;"\t"&lt;&lt;pow(num,4.0)&lt;&lt;endl;
  cout&lt;&lt;"Would you like to continue (Y or N)? ";
  cin&gt;&gt;ans;
  }
  cout&lt;&lt;"\n\t\t\tT H A N K  Y O U"&lt;&lt;endl;
  system("pause");
  
  return 0;
  }
  </code></pre>