Challenge #9 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

Challenge #9

find the largest number among 5 number Example : 5 8 5 1 7 8 Any programming languages are most welcome !!!

13th Dec 2017, 1:42 AM
Amar Dahake
7 Answers
13th Dec 2017, 8:46 AM
Maz
Maz - avatar
+ 7
Simple; works for any number of inputs. https://code.sololearn.com/cW46qONAtXsJ/?ref=app
13th Dec 2017, 1:55 AM
blackcat1111
blackcat1111 - avatar
+ 4
https://code.sololearn.com/cyos1g09s0Pz/?ref=app
13th Dec 2017, 3:05 AM
...
+ 4
Another Python version. The max() builtin really does all the work. https://code.sololearn.com/cqU5bqXMeC67/?ref=app
13th Dec 2017, 6:41 AM
Eric Blinkidu
Eric Blinkidu - avatar
+ 3
13th Dec 2017, 7:02 AM
Eric Blinkidu
Eric Blinkidu - avatar
+ 2
With builtin max() (in Python): print(max([int(s) for s in input.split()]))
13th Dec 2017, 3:55 AM
LunarCoffee
LunarCoffee - avatar
+ 1
hi. i am Annas from Pakistan. looking forward for you suggestions. This works for 5 inputs. https://code.sololearn.com/cLq94YZpGHk8/?ref=app
13th Dec 2017, 8:50 AM
Syed Annas Shah
Syed Annas Shah - avatar