Looking in the help section, either I've skipped a lesson inadvertently or people are getting responsesfrom other sources.
We've seen how to get min and max briefly withsome examples of the if and else when there are 2 numbers concerned.
How on earth are we expected to reasonably do this in a SIMPLE way (perhaps with more code) in accordance withwhat we have learned thus far.
I feel this is unfair.
Where are there sources to know this?
Resolved
Comments (2)
- Popular
- New
- Old
You must be signed in to leave a comment
Guadalupe Gagnon
19 January 2019, 17:36
What Roman is saying is that you already know how to get the min of two numbers, all you have to do is repeat this twice. For example, you have three numbers a, b, and c, follow these steps:
Get the min of a and b , set it to something like d ( int d = min(a, b) )
Then display the min of d and c. ( Sys.out.print(min(d,c)) )
Also google "find the minimum of three int java", you can solve anything with google, I did through all the levels.
0
Roman Ivanov
19 January 2019, 15:49
We can achieve a result SIMPLY by comparing the third number with the result of comparing the other two numbers.
I feel this is obvious :)
0