Step 4 of 6
Shorthand operators
Updating a variable with itself is so common that C has shortcuts:
| Shorthand | Means |
|---|---|
x += 5; |
x = x + 5; |
x -= 5; |
x = x - 5; |
x *= 2; |
x = x * 2; |
x++; |
x = x + 1; |
x--; |
x = x - 1; |
Your turn: fill in the shorthand operators so the program prints Streak: 12.