Nested If Statement
#include <stdafx.h>
#include <iostream>
using namespace std;
int main()
{
int a=3;
if(a==1){
cout<< "Value of a is 1";
}
else if(a ==2)
{
cout<< "Value of a is 2";
}
else if(a ==3)
{
cout<< "Value of a is 3";
}
return 0;
}
Output:
Value of a is 3