Write a program that calculates the average of a four lab marks. It should use the...

50.1K

Verified Solution

Question

Mechanical Engineering

Write a program that calculates the average of a four lab marks.It should use the following functions:

• void getMarks() should ask the user for a lab marks, store itin a reference parameter variable, and validate it so that labmarks lower than 0 or higher than 100 is not accepted. Thisfunction should be called by main once for each of the four labmarks to be entered.

• void avgGradeDisp() should calculate and display the averageof the four lab marks rounded to the nearest whole number. Itshould also display the grade of the average lab marks obtained bythe student as per the table given below.

Lab Marks Grade GPA 75 - 100 A 3 65-74 B 2 50-64 C 1 0-49 F0

Answer & Explanation Solved by verified expert
4.2 Ratings (921 Votes)
include include using namespace std float L1 float L2 float L3 float L4    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students