✕
C++ Functions and ScopeCoding problems
C++ Functions and Scope: coding problems
Write a program that reads the input and prints the answer. Run checks it against every test, including hidden ones.
0 of 8 solved
Three builders each stack blocks, and the foreman wants the height of the tallest tower. Read the three heights and print the largest one. Write a function
int maxOf(int a, int b)and use it, so the program has the shape of a real function call.Constraints: each height is a whole number from -1000000000 to 1000000000.
Input. One line with three integers a, b and c.
Output. One integer: the largest of a, b and c.
Example 1 input
3 9 4
Output
9
Example 2 input
-5 -2 -8
Output
-2