0
3 nos are input. Output will be 1 if 3 nos can form a triangle or else output 0.
https://code.sololearn.com/c5YvMYfbi0YU/?ref=app pls check my code. I am not able to run it properly.
3 Antworten
+ 4
If 3 numbers form a triangle, all three inequalities must hold => replace || with && in first condition.
^ is not exponentiation, but binary xor. To get second power use x*x.
+ 2
Nilutpol Kashyap you're welcome
+ 1
thanks a lot michal it did work