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!!!
4 Answers
New AnswerHavibg troubles using Nested if statements in C++ https://code.sololearn.com/cmXlriMpub5N/?ref=app https://code.sololearn.com/cmXlriMpub5N/?ref=app
3/16/2021 1:04:39 AM
Jessica Zarate4 Answers
New Answeryou 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)...
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
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message