0

Why in my code the else if statement is not working??please explain

https://code.sololearn.com/cy5VNqt7QiKg/?ref=app

17th Feb 2018, 8:27 AM
Amritesh Gupta
Amritesh Gupta - avatar
5 Answers
+ 1
there was unneeded curly braces here is your morified code https://code.sololearn.com/cJdeJ5CQryxA/?ref=app
17th Feb 2018, 8:44 AM
Farshaad Heydari
Farshaad Heydari - avatar
+ 1
it's working fine..... it's printing 0. since the first part of if is true
17th Feb 2018, 9:03 AM
Farshaad Heydari
Farshaad Heydari - avatar
0
But if else statement yet not fixed
17th Feb 2018, 8:59 AM
Amritesh Gupta
Amritesh Gupta - avatar
0
it shows same output when num1>10 and num1<10
17th Feb 2018, 9:09 AM
Amritesh Gupta
Amritesh Gupta - avatar
0
in your code there is no increment or decrement for num1 so the cod inside" if else" never gets executed
17th Feb 2018, 9:13 AM
Farshaad Heydari
Farshaad Heydari - avatar