Conditional Statement if and else in c++




This video tutorial explains the conditional statements if and else in c++.
You will learn how to use if and else in c++, how to use comparision operator with if with an example.

source code for this tutorial

#include <iostream>

using namespace std;

int main()
{
    int age = 22;
    if( age <= 17 ){
        cout << "you cant vote so go home" <<endl;

    }else{
    cout << "yes yes yes you can vote"<<endl;
    }
    return 0;
}