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