if statement cpp code example
Example 1: C++ if else
#include<iostream>
using namespace std;
int main()
{
int grade;
cin >> grade;
if( grade >= 60 )
cout << "You Pass!" << endl;
else
cout << "You Fail..." << endl;
return 0;
}
Example 2: if c++
int x = 20;
int y = 18;
if (x > y) {
cout << "x is greater than y";
}