in reply to Re: I am stuck on how to print the largest and smallest numbers from user inputted values. Any help is appreciated.
in thread I am stuck on how to print the largest and smallest numbers from user inputted values. Any help is appreciated.
Personally, I'd want to set the min and max to undef.
I then have a min/max function that skips over undefs in the input list (rather than treating undef as zero). If everything in the list is undef, then the result is undef. Otherwise the min/max of the defined values is returned.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: I am stuck on how to print the largest and smallest numbers from user inputted values. Any help is appreciated.
by Loops (Curate) on Nov 20, 2014 at 20:10 UTC |