I wrote this code for challenge ques " Find largest of three no." and it worked fine for first two test cases but failed for third one. what’s the issue and how to fix it?
Code for finding largest of 3 no's failed test case 3
Hello @yanshigoyal1221_811b6a2e867b2070,
Your code won’t print anything if any of the two elements are equal.
Test cases like this: ( 1 1 2), (6 6 6)
Correct:
change every condition from x>y to x>=y
if((x>=y) && (x>=z))
Hi @yanshigoyal1221_811b6a2e867b2070,
Could you please tell me the exact error you are getting while submitting the solution?
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.
