Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem #2: (20 pts) Write a program that prompts the user to enter the number of exams he/she did in a course. To pass the
Problem #2: (20 pts) Write a program that prompts the user to enter the number of exams he/she did in a course. To pass the course, the grade of each exam should be greater or equal to 40, and the average of all grades should be greater or equal to 60. Sample run 1: Enter the number of exams: 5 Enter the grade of exam 1: 80 Enter the grade of exam 2: 26 Your grade in exam 2 is less than 40. You fail! Sample run 2: Enter the number of exams : Enter the grade of exam 1: 80 Enter the grade of exam 2: 50 Enter the grade of exam 3: 48 Enter the grade of exam 4: 96 4 Your average is 68.5. You succeed! Sample run 3: Enter the number of exams: 3 Enter the grade of exam 1: 50.5 Enter the grade of exam 2: 43 Enter the grade of exam 3: 43 Your average is 45.5. You fail
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started