Trouble | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
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 Réponse
+ 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