Compound Assignment in C
Level 259 keystrokes
Adds 50 to total (100) with the compound assignment operator += and prints "Total: 150".
C code
// total starts at 1001int total = 100;// += adds the right side to the variable: total = total + 50, now 1502total += 50;// Prints "Total: 150"3printf("Total: %d\n", total);Output
Total: 150
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.
;× 3"× 2=× 2,× 1:× 1(× 1)× 1\× 1%× 1+× 1