Trouble with loops : <p>I have this simple program to formulate a table of any given number however at the end i want the user to be prompted to either end the program or formulate another table.however the loop does not occur.(i'm only a newbie)</p>

<pre><code>int table(){
  int tablenumber;
  int tablecount;
  cout&lt;&lt;"which number's table would you like to print?"&lt;&lt;endl;
  cin&gt;&gt;tablenumber;
  cout&lt;&lt;"till which number would you like to multiply it?"&lt;&lt;endl;
  cin&gt;&gt;tablecount;
  for(int i=0; i&lt;=tablecount; i++){
  cout&lt;&lt;tablenumber&lt;&lt;" X "&lt;&lt;i&lt;&lt;"="&lt;&lt;tablenumber*i&lt;&lt;endl;
  }
}

int main(){
  bool yes=true;
  bool no=false;
  char answer= yes;
while(answer==true){
  table();
  cout&lt;&lt;"would you like to formulate another table?(yes/no)"&lt;&lt;endl;
  cin&gt;&gt;answer;
  }

 return 0;
}
</code></pre>
