Demonstrate relational operators - C++ Operator

C++ examples for Operator:Relational Operator

Description

Demonstrate relational operators

Demo Code

#include <iostream>
using namespace std;
int main()/*from  w  w  w  .j  av  a2s  .c om*/
{
   int numb;
   cout << "Enter a number: ";
   cin >> numb;
   cout << "numb<10  is " << (numb < 10)  << endl;
   cout << "numb>10  is " << (numb > 10)  << endl;
   cout << "numb==10 is " << (numb == 10) << endl;
   return 0;
}

Result


Related Tutorials