I'm trying to help my daughter with her C homeowork. I'm a longtime developer but have not worked in C in decades. She has the following problem:
The mathematical operation min(x,y) can be represented by the conditional
(x < y) ? x : y
In similar fashion, using only conditional expressions, describe the
min(x, y, z) and max(x,y,z,w)
I understand how the min(x,y) translate into (x < y) ? x : y
and that (x < y) ? x : y is tha same as If x < y then x else y
but am drawing a blank as to how to code the two problems.
Can anyone help?