192k views
4 votes
What program we write for nested if in c++ to print something after else part but before inner if else

if(condition){
}
else
//something we want to print
if(condition){
}
else{
}

User Kingofmit
by
8.0k points

1 Answer

3 votes

Answer:

if(condition){

}

else {

// something we want to print

if(condition) {

// ...

}

else {

// ...

}

}

Step-by-step explanation:

Create code blocks using curly braces { ... }.

Use proper indentation to visibly make it clear where code blocks start and end.

User Ilkdrl
by
7.6k points

No related questions found

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.