max (more scheme)

I need to get a range of integer numbers (from a to b) and find the max number in that range.
how to do that?
Who is Participating?
shlomoyConnect With a Mentor Commented:
(define (getMax a b) (max a b))

that's assuming that the range is either [a,b] or [b,a].

if you want the maximum of a list of numbers that's another thing.

rodleAuthor Commented:
oh! yes. stupid of me.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.