Im having problems with the if statement | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Im having problems with the if statement

I can't seem to be able to make the second if statement work cause i made a code that identifies if a number is positive ir negative but i wanted to add The ability to identify 0 https://code.sololearn.com/cA240A0A2353/?ref=app

29th Dec 2020, 7:32 PM
Comododraw
Comododraw - avatar
2 Answers
+ 2
if (a>0) { ... } else if (a<0) { ... } else { ... // 0 }
29th Dec 2020, 7:36 PM
ChaoticDawg
ChaoticDawg - avatar
+ 1
Thank you In the lesson it was different thx for answering my question
29th Dec 2020, 7:37 PM
Comododraw
Comododraw - avatar