The Greater-Than or Equal To Operator - C++ Operator

C++ examples for Operator:Relational Operator

Description

The Greater-Than or Equal To Operator

Demo Code

#include <iostream> 
  
using namespace std; 
  
int main(int argc, char *argv [])
{ 
        cout << "Enter your first number: " << endl; 
        int number1 = 0; 
        cin >> number1; /*from  w w w.  ja v a 2  s.c  o  m*/
  
        cout << "Enter your second number: " << endl; 
        int number2 = 0; 
        cin >> number2; 
  
        bool result = number1 >= number2; 
        cout << "It is " 
                << result 
                << " that your first number is greater than" 
                << " or equal to your second." 
                << endl; 
  
       return 0; 
}

Result


Related Tutorials