Integer comparison: Difference between revisions

m
(→‎{{header|Korn Shell}}: Corrected example (the old version had the same semantic, but didn't meet the task's requirements))
Line 111:
=={{header|C++}}==
#include <iostream>
#include <istream>
#include <ostream>
int main()
Line 121 ⟶ 119:
// test for less-than
if (a < b)
std::cout << a << " is less than " << b << "\n"std::endl;
// test for equality
if (a == b)
std::cout << a << " is equal to " << b << "\n"std::endl;
// test for greater-than
if (a > b)
std::cout << a << " is greater than " << b << "\n"std::endl;
return 0;
Anonymous user