Less Than Comparison in C++

Level 124 keystrokes

Prints the result of 3 < 5, which is true and shown as 1.

C++ code

// < checks whether the left value is less than the right one
// 3 is less than 5, so the result is true, which cout prints as 1
1cout << (3 < 5) << endl;

Output

1
Practice typing this code

Practice typing this code. Results are not recorded in the rankings.

Symbols in this code

The symbols you type in this C++ code and how often they appear.

  • <× 5
  • ;× 1
  • (× 1
  • )× 1

More C++ examples at level 1

← C++ typing practice