Division in C

Level 121 keystrokes

Prints the result of dividing 84 by 7.

C code

// / between two ints is integer division: 84 / 7 = 12, printed with %d
// Any fraction is dropped (85 / 7 would also give 12)
1printf("%d", 84 / 7);

Output

12
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.

  • "× 2
  • ,× 1
  • ;× 1
  • (× 1
  • )× 1
  • /× 1
  • %× 1

More C examples at level 1

← C typing practice