Integer comparison: Difference between revisions

(Undo revision 28963 by Paddy3118 (Talk) The task asks for the three tests!?)
Line 143:
 
=={{header|C++}}==
#include <iostream>
using namespace std;
 
int main()
{
int a, b;
std::cin >> a >> b;
// test for less-than
if (a < b)
std::cout << a << " is less than " << b << std::endl;
// test for equality
if (a == b)
std::cout << a << " is equal to " << b << std::endl;
// test for greater-than
if (a > b)
std::cout << a << " is greater than " << b << std::endl;
}
return 0;
}
 
=={{header|C sharp|C#}}==
Anonymous user