Solved. Can't figure out what I'm doing wrong | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Solved. Can't figure out what I'm doing wrong

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

29th Apr 2023, 11:42 AM
Charlie Thompson
Charlie Thompson - avatar
6 Answers
+ 7
Charlie Don't put semicolon after if condition. First if block is in proper, but next if condition have semi colon which ends if block there. Remove those.
29th Apr 2023, 1:40 PM
Jayakrishna 🇮🇳
+ 6
Charlie Thompson don't use semicolon (;) in conditions
29th Apr 2023, 2:24 PM
Sakshi
Sakshi - avatar
+ 5
Charlie Thompson , there is no output, when the age is 12. Either include it in first if clause, or in the second else if clause.
29th Apr 2023, 11:54 AM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
+ 5
You also have too many semi-colons ";". I've fixed your code: https://code.sololearn.com/cidNMt4r1d7B/?ref=app
29th Apr 2023, 12:01 PM
Ausgrindtube
Ausgrindtube - avatar
+ 4
Charlie Thompson else if(...); <--remove this
29th Apr 2023, 12:01 PM
Bob_Li
Bob_Li - avatar
+ 1
Remove the semicolons after else if condition
29th Apr 2023, 5:06 PM
Atharv Mane
Atharv Mane - avatar