title: Using a for loop to read ONLY 5 numbers and average them. JAVA
body: <p>Really having issues with this program I'm making. I've searched this site and a few others, although have yet to find a solution. It may look like I'm just soliciting help but I truly am stuck. I am to make a program that reads in 5 numbers from the user and average those numbers. My extent of knowledge of Java is the Scanner class and for loops, yet haven't used while loops yet. Here is the very poorly written code:</p>
  
  <pre><code>public class Average5
  {
     public static void main(String args[])
  {
     Scanner sc = new Scanner(System.in);
     int num;
  
     System.out.print("Please enter a number: ");
     num = sc.nextInt();
  
     for(int num1 = 0; num1 &lt;= num; num1++)
     {
          System.out.print("Please enter a number: ");
          num = sc.nextInt();
     }
  </code></pre>
  
  <p>I honestly have no clue what to do. More or less self taught.</p>