0
Can anyone help me fix my code. (Nested if statement C++) I tried to run it but it doesn't give reasonable outputs. THANK YOU!!!
Havibg troubles using Nested if statements in C++ https://code.sololearn.com/cmXlriMpub5N/?ref=app https://code.sololearn.com/cmXlriMpub5N/?ref=app
4 Answers
+ 3
https://code.sololearn.com/cIb5J96zV1lg/?ref=app
+ 1
you could do:
if (condition) {}
else if (other_condition) {}
else {}
with how many 'else if' conditions you need, with or without a final else (without condition)...
+ 1
You can put multiple conditions inside one if statement by using logical operators like AND (&&)/ OR (||), so these nested if will no longer be needed
0
Oh i can just use else if (). Thank you sooo sooo much visph