I'm having a problem using a double greater than comparison. The code is suppose to validate true to my understanding but does not. Can any one help.
int j = 105, i = 101, k = 99;
if ( j > i > k)
cout << " j > i > k === true" ;
cout << "j > i > k === false";
a > b > c means something completely different from what you'd expect. You have to write it as a > b && b > c.
Also, === is not a legal operator.
if (j > i && i > k).
Relational operators (such as less-than and greater-than) return a bool. Your code tries to check if a bool is greater than an int.