Use relational operators to compare int type variables : int read « Data Types « C++ Tutorial






#include <iostream>   
using namespace std;   
  
int main(){   
   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;   
}








2.2.int read
2.2.1.Read int and do the calculation
2.2.2.Use relational operators to compare int type variables
2.2.3.Read integer from console using cin
2.2.4.Read int and char array from keyboard