i need help writing a program that compares 5 numbers and returns the max, i have the code that compares 3 numbers but i don't know how to expand it to 5.
here's the code for the max of 3
(define max3
(lambda (x y z)
(if (> x y)
(if (> y z)
x
(if (> x z)
x
z)
)
(if (> y z)
y
(if (> x z)
x
z)
)
)
)
)