Question: Write a C + + function that will work as a mark calculator.The program should have a function called MarkCalc ( ) which receives three

Write a C++ function that will work as a mark calculator.The program should have a function called MarkCalc() which receives three parameters: the marks of 2 courses (double) and an option (int) from the user. The function should work as follows, using an if_else chain or switch: If option is 1The function will return the maximum mark out of the 2 passed marksIf option is 2The function will return the average of the passed 2 marksOtherwiseThe function will return -999.00 At the beginning of the program, type your full name and your ID as a comment.In the main () prompt the user to enter the 2 marks and the option, then call the function MarkCalc() properly. PS: The function should return a double value.In the main() function, display the result of calling the function MarkCalc().Create a function prototype and function difinition for all functions.USE appropriate input/ output messages and correct data types.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!