C++

Objectives :

  • bool greater than
  • operator != not eqaul t0
  • greater than (>), less than (<)
  • not equal to (!=)
  • compare equals to (==)

Step: 1 Create a project

Step: 2 Create a source file

Step: 3 Edit Source code

#include <iostream>
#include <string>
using namespace std;
// bool, greater than, compare
int main()
{
bool b1, b2, b3 ,b4;
b1= 0; b2 =1;
b3 = false;
b4 = true;
if(b1<b2){cout<< " b1<b2 :true " << b2 << endl;}
if(b3<b4){cout<< " b3<b4 :true " << b4 << endl;}
if(b3 !=true){cout << " b3 !=true "<< b3 << endl;}
if(b4==true){cout << " b4 ==true "<< b4 << endl;}
return 0;
}
 

Step: 4 Runtime View

Step: 5b