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
6.1k 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
5.6k points