Question: Write a function that finds the max of three ints that are parameters of the function. The function also has a fourth parameter representing a

Write a function that finds the max of three ints that are parameters of the function. The function also has a fourth parameter representing a threshold (also int). If the threshold parameter value is above 100, the function should use 100 as the threshold. If the max is below the threshold, the program should return the max. If the max is above or equal to the threshold, the program should return the threshold. If the function arguments are 26410, the function returns 6. If the function arguments are 20604010, the function returns 10. If the function arguments are 2006004001000, the function returns 100.
Your program must define a function: int FindMax(int a, int b, int c, int t)

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 Programming Questions!