+1

The else if statement has not been used in this c++ lesson. Wondering if it can be used! Anyone to help me please

Is it applicable.?

8/9/2019 4:13:22 AM

Navigator Moses

4 Answers

New Answer

+2

Helpful, but I know if else can be used. My question was about else if statement!

+1

from what i know in every language there's no else without an if. so if-else-if is closer to what you ask. it is in c/c++. if you have a few if-else-if statements to use for a logic then it can be an answer. but the more statements you need to nest in it the more viable a switch statement becomes.

+1

@Navigator Moses int x = 5, y = 10 if(x <5) { } else if(x > 5 && y <= 10) { } else { }

0

you can try some of these: -search on the bar in the q&a section for else if stament c++ to see if it was asked before -search on the internet, if you don't have access to google in your country you can still search on the internet for the subject. this will help you get access to explanation and examples faster than posting the question and waiting for an answer. this will help you earn more time on the long run. i am not advising you to not use the q&a section of sololearn, i'm just saying you can earn more independence in your research, as this is being looked for in a programmer at the workplace. yes you can use if else statements in c++. for reference and further study here's a link on the subject: https://www.google.com/amp/s/www.geeksforgeeks.org/decision-making-c-c-else-nested-else/amp/