+ 2

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.?

9th Aug 2019, 4:13 AM
Navigator Moses
Navigator Moses - avatar
4 Réponses
+ 4
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.
9th Aug 2019, 5:19 AM
notqueued
notqueued - avatar
+ 2
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/
9th Aug 2019, 4:30 AM
notqueued
notqueued - avatar
+ 2
Helpful, but I know if else can be used. My question was about else if statement!
9th Aug 2019, 5:12 AM
Navigator Moses
Navigator Moses - avatar