title: I would like add GPA in my code but unfortunately not working
body: <p>I would ask if someone can help me the GPA in my code not working as per required.please find below it.</p>
  
  <p>Scanner Student=new Scanner(System.in);
                  System.out.println("Please Enter Three Marks for Student");</p>
  
  <pre><code>            int sum=0;
  
              double avg;
              int[]x=new int[3];
  
          for (int i = 0; i &lt; x.length; i++) {
          System.out.println("The mark : "+ ( i +1));
          x[i]=Student.nextInt();
          sum=sum+x[i];
  </code></pre>
  
  <p>}</p>
  
  <pre><code>         char grade;
  
          if (sum &gt;= 90 )
    {
       grade = 'A';
    }
    else if (sum &gt;= 80 )
    {
       grade = 'B';
    }
    else if (sum &gt;= 70)
    {
       grade = 'C';
    }
    else if (sum &gt;= 50)
    {
       grade = 'D';
    }
    else
    {
       grade = 'F';
    }
  
    // Display the grade.
                      System.out.println("The grade is " + grade);
  
          avg=sum/x.length;
                      System.out.println("The total of three marks are :"+sum+"\nThe Average is :"+avg);
  }
  </code></pre>