0
Why else is printed?
2 odpowiedzi
+ 3
Mohammad Because second if condition is failed so it will go in else part.
If you don't want to print the else part Just do like this:
if(cp < sp) {
} else if(cp > sp) {
} else {
}
+ 2
Mohammad You can share your code like this. So it would be easy to go on your code.
https://code.sololearn.com/ce6LI0L8GwvO/?ref=app