Modulo in C
Level 121 keystrokes
Prints the remainder when 17 is divided by 5.
C code
// Outside the format string, % is the remainder operator// 17 = 5 * 3 + 2, so 17 % 5 is 2, printed with %d1printf("%d", 17 % 5);Output
2
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%× 2,× 1;× 1(× 1)× 1