Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Make a program that asks the user for his/her scores in the 3 exams(integer) out

ID: 3615472 • Letter: M

Question

Make a program that asks the user for his/her scores in the 3 exams(integer) out of 100. Then computes for the average of the 3 exams(double). And lastly, tells the user if he/she passed or failed.The user passes if his/her average score is 60 and above otherwisehe/she fails.

Sample output:

enter score in exam 1: 80
enter score in exam 2: 90
enter score in exam 3: 100
average score of the 3 exams: 90
pass

Explanation / Answer

please rate - thanks import java.util.*; public class untitled {public static void main(String[] args)    {double avg;    double g1,g2,g3;    Scanner in=new Scanner(System.in);    System.out.print("enter score in exam 1: ");    g1=in.nextDouble();    System.out.print("enter score in exam 2: ");    g2=in.nextDouble();    System.out.print("enter score in exam 3: ");    g3=in.nextDouble();    avg=(g1+g2+g3)/3.;    System.out.println("average score of the 3exams: "+avg);    if(avg>=60.)         System.out.println("pass");    else         System.out.println("fail");               } }

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote