Trouble | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Trouble

In the code below why is it that every time the first ā€˜ifā€™ statement is true, the else statement is also executed??!! https://code.sololearn.com/cm4xUFU9Z106/?ref=app

6th Oct 2018, 2:57 AM
Sam
Sam - avatar
1 Resposta
+ 2
Chain the 2nd condition at line 17 to the 1st condition with else if.
6th Oct 2018, 4:11 AM
HoĆ ng Nguyį»…n Văn
HoĆ ng Nguyį»…n Văn - avatar