Comparison in C++

Level 124 keystrokes

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

C++ code

// The parentheses are needed because << has higher precedence than >
// 5 > 3 is true, and cout prints true as 1
1cout << (5 > 3) << 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.

  • <× 4
  • ;× 1
  • (× 1
  • )× 1
  • >× 1

More C++ examples at level 1

← C++ typing practice