/*
Syntax : op1 ? op2 : op3;
Nested Ternary operator: Ternary operator can be nested.
A nested ternary operator can have many forms like :
a ? b : c
a ? b: c ? d : e ? f : g ? h : i
a ? b ? c : d : e
*/
// nested ternary operators
#include <bits/stdc++.h>
using namespace std;
int main()
{
cout << "Execute expression using"
<< " ternary operator: ";
// Execute expression using
// ternary operator
int a = 2 > 5 ? 2 : 5;
cout << a << endl;
cout << "Execute expression using "
<< "if else statement: ";
// Execute expression using if else
if ( 2 > 5)
cout << "2";
else
cout << "5";
return 0;
}