+ 5
Challenge #9
find the largest number among 5 number Example : 5 8 5 1 7 8 Any programming languages are most welcome !!!
10 Answers
+ 17
W/O Math.max() :-
https://code.sololearn.com/WcK9mX4bWOs3/?ref=app
W/H Math.max() :-
https://code.sololearn.com/WUWAADYL2OPI/?ref=app
+ 7
Simple; works for any number of inputs.
https://code.sololearn.com/cW46qONAtXsJ/?ref=app
+ 4
https://code.sololearn.com/cyos1g09s0Pz/?ref=app
+ 4
Another Python version. The max() builtin really does all the work.
https://code.sololearn.com/cqU5bqXMeC67/?ref=app
+ 3
c++ version using max_element
https://code.sololearn.com/cEuI7gCZMLQD/?ref=app
+ 2
With builtin max() (in Python):
print(max([int(s) for s in input.split()]))
+ 1
hi. i am Annas from Pakistan.
looking forward for you suggestions.
This works for 5 inputs.
https://code.sololearn.com/cLq94YZpGHk8/?ref=app