Integer comparison: Difference between revisions

→‎{{header|C++}}: Idiomatic C++ does not include "using namespace std"
(Kotlin entry)
(→‎{{header|C++}}: Idiomatic C++ does not include "using namespace std")
Line 415:
=={{header|C++}}==
<lang cpp>#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 << endl"\n";
 
// test for equality
if (a == b)
std::cout << a << " is equal to " << b << endl"\n";
 
// test for greater-than
if (a > b)
std::cout << a << " is greater than " << b << endl"\n";
}</lang>