Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

More Books

Students also viewed these Databases questions

Question

Discuss the history of human resource management (HRM).

Answered: 1 week ago