- 2

Define two functions to print the maximum and the minimum number respectively among three numbers entered by user.

someone please write a program for this.

15th Mar 2018, 4:53 PM
Vikram Vm
Vikram Vm - avatar
2 odpowiedzi
+ 1
What do you have so far?
15th Mar 2018, 4:56 PM
Ulisses Cruz
Ulisses Cruz - avatar
0
Since you didn't ask for a language here is Kotlin solution. You should be able to understand and code in your language of choice. fun min(Int a, Int b, Int c) = if (a < b) if (a < c) a else if (b < c) b else c else if (b < c) b else c fun max(Int a, Int b, Int c) = if (a > b) if (a > c) a else if (b > c) b else c else if (b > c) b else c
15th Mar 2018, 5:24 PM
John Wells
John Wells - avatar