Modulo Operation in C
Level 123 keystrokes
Outputs the remainder of 17 divided by 5.
C code
// The % operator calculates the remainder (modulo)// 17 % 5 = 2 because 17 = 5 * 3 + 21printf("%d\n", 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\× 1