Question: /* Week2 in-class exercise Name: Average.java Author: Clancey Moreino Date: 05/26/25 */ public class Average { public static void main(String[] args) { double grade1 =
/* Week2 in-class exercise Name: Average.java Author: Clancey Moreino Date: 05/26/25 */ public class Average { public static void main(String[] args) { double grade1 = 76.0; double grade2 = 83.0; double grade3 = 62.0; // TO DO: // // a. Compute and display the average grade double average = (grade1 + grade2 + grade3) / 3.0; System.out.printf("The average grade is: %.2f%n", average); // Display with two decimal points // b. Display a PASS/FAIL message if (average >= 75.0) { System.out.println("Result: PASS"); } else { System.out.println("Result: FAIL"); } } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
