Question: Need help taking this average grade and having it print out the letter grade equivalent based on the average percent import java.util.Scanner; import java.math.RoundingMode; import

Need help taking this average grade and having it print out the letter grade equivalent based on the average percent

import java.util.Scanner; import java.math.RoundingMode; import java.text.DecimalFormat;

public class a1 {

public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.print("enter first grade: "); double g1 = in.nextInt(); System.out.print("enter second grade: "); double g2 = in.nextInt(); System.out.print("enter third grade: "); double g3 = in.nextInt(); System.out.print("enter fourth grade: "); double g4 = in.nextInt(); System.out.print("enter fifth grade: "); double g5 = in.nextInt(); System.out.printf("your average grade is: %.2f",(g1+ g2+ g3+ g4+ g5)/5);

} }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!