title: How can I write Java code for average calculator
body: <p>I am a new student in Java (I study myself at home), I tried to solve this exercise starting from this code I could not, the question says:</p>
  
  <p>"Given that you have five input values and "average" method, calculate the average value for the five input values inside the average method and return it"
   and this is the code:</p>
  
  <pre><code>public class MyCalculator { 
  
   int input1 = 10; 
   int input2 = 20; 
   int input3 = 30; 
   int input4 = 40; 
   int input5 = 50;
  
   public float average() {
  
    // TODO: write java code to calculate the average for all input variables 
  
     return 0; 
   }
  }
  </code></pre>