0

How do i check which is the largest element in a function which takes default parameters?

Create a function called max that returns the maximum of the parameters it takes. It can take as parameters only positive integers. The function can take 1 , 2  ,3  or 4 parameters. DO NOT USE FUNCTION OVERLOADING. (hint use default parameters)  Test your function in main for 2 3  and 4 parameters. Read the parameters from the user. Below we show the example input output :

11th Sep 2020, 10:29 AM
eerv
eerv - avatar
1 Resposta
+ 1
Set the default parameters as small as possible that is the minimum value that data type can hold.
11th Sep 2020, 10:48 AM
Arsenic
Arsenic - avatar