C++ Nested Switch , Nested If

Nested If,Else If,Else:

if(a<b){
if(c>a)
{
statement;
}
statement;
}else{
if(c>d){
statement;
}
statement;
}

 

Just another example here:

if(a==10){
if(b==5)
{
statement;
}
statement;
}

Nested Switch Statement:

char a,b;
cin>>a>>b>>endl;
switch(a){
case 'A':
cout<<"ops";
switch(b){
case 'B':
cout<<"Hmm";
break;
default:
cout<<"Tata";
}
break;
default:
cout<<"Nai!";

}

 

 

 

It would be a great help, if you support by sharing :)
Author: zakilive

Leave a Reply

Your email address will not be published.