Mega Code Archive

 
Categories / C++ Tutorial / Language Basics
 

Comparing data values

#include <iostream> using std::cin; using std::cout; using std::endl; int main() {   char first = 10;   char second = 20;   cout << "The value of the expression first < second is: "        << (first < second)        << endl        << "The value of the expression first == second is: "        << (first == second)        << endl;   return 0; } The value of the expression first