Syntax:
if (condition)
{
Statements;
.
.
if (condition)
{
Statements;
.
.
}
.
.
}
/*—————————————————————–
#include<iostream.h>
#include<conio.h>
void main()
{
int a= 10,b=20,c=30;
if (a>b)
if (a<c)
cout<<” a is small “;
getch();
}
/*———————————————————–*/
Output:
a is small
See also: Nested If…Else Statements in C++
Not Satisfied ? Just search & get the result
Related posts:
