+ 16
Wanna compare challenge?
How about writing some codes without compare expressions? Bring a code with method which returns maximum from two inputed decimal numbers whithout using else-if statesments or <,>,== compare operators. Here my solution on c++ for (double) inputed numbers which >=0. https://code.sololearn.com/csUAy46hfPVi/#cpp Later I will improved for any numbers. Use any language.
8 ответов
+ 6
Here is mine:
https://code.sololearn.com/cAG37Owk6GAl
+ 5
One-line✓
No expressions✓
No max() method✓
Negative numbers✓
104 bytes✓
Enter two numbers separated by comma :)
https://code.sololearn.com/c5CWbTly3RIO/?ref=app
+ 4
Here's my try
https://code.sololearn.com/W9arN1C7bRoX/?ref=app
+ 3
https://code.sololearn.com/cPA4s586WFBu/?ref=app
Another one: (abusing list sort)
https://code.sololearn.com/cm1dbDpHxEXT/?ref=app
+ 2
Here is my own approach, it only works for positive numbers though, I will try to improve it later.
https://code.sololearn.com/cgD9esVIkOkR/?ref=app
+ 2
https://code.sololearn.com/c0foyi4mw6Tr/?ref=app