Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Security XI Status And Prospects

Authors: T.Y. Lin, Shelly Qian

1st Edition

0412820900, 978-0412820908

More Books

Students also viewed these Databases questions

Question

=+ Are unions company-wide, regional, or national?

Answered: 1 week ago

Question

=+j Explain the litigation risks in international labor relations.

Answered: 1 week ago

Question

=+j What rules will apply to the process of negotiations?

Answered: 1 week ago