title: Need a loop to repeat as many times as the user entered
body: <p>I need help with this assignment.  **Here is what i need the program to do:</p>
  
  <blockquote>
    <ul>
    <li>Write a program that prompts a user for a number of iterations.  </li>
    <li>The program should then loop that many times.  </li>
    <li>Each loop the program should prompt the user for a number and add it to a running total.  </li>
    <li>Print the running total when you are done.</li>
    </ul>
  </blockquote>
  
  <p>I cant get the program to loop as many times as the user enters.  I know this is a simple fix but i cant seem to figure it out.  Am i using the wrong statement for the loop?  </p>
  
  <pre><code>Scanner guess = new Scanner(System.in);
  
  int count =0;
  int sum=0;
  int num;
  
  System.out.println("Enter a number");
  num = guess.nextInt();
  
  for(count =0; count &lt;= num; count++)
  {
      sum +=num;
      System.out.println("Your results are:"+sum);
  }
  </code></pre>