Subtraction in Swift

Level 113 keystrokes

Subtracts 8 from 20 and prints the result, 12.

Swift code

// Subtract 8 from 20 and print the difference: 12
1print(20 - 8)

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 Swift code and how often they appear.

  • -× 1
  • (× 1
  • )× 1

More Swift examples at level 1

← Swift typing practice