Conditional Statements in c++: if-else
Conditional statements are the decision-making statements which makes the program to flow in a direction based on the inputs. In c++, the list is given below…. 1. If-else 2. Switch 3. Ternary operator Each one is explained with an example. ‘if-else’: The most commonly used conditional statement is ‘if-else’. It has the following syntax.. ‘if’ statement: If(condition) { ………………………………. } C++ Program: #include <iostream> using namespace std; int main() { int a; cout <<"Enter the number"<<endl; cin >> a; if (a>1) { cout<<"a is greater than 1...