Explore BrainMass

C++ programming-Function

Max is a function that accepts two int parameters and returns the value of the larger one.
Four int variables, p1, p2, p3, and p4 have already been declared and initialized. Write an expression (not a statement!) whose value is the largest of p1, p2, p3, and p4 by calling max. Call max three times and you will need to pass the return values of two of those calls as arguments to max.

Solution Summary

C++ programming-Function is modeled.