Floating Point in Swift

Level 117 keystrokes

Multiplies two Double values and prints the result, 6.28.

Swift code

// Literals with a decimal point are Double: 3.14 * 2.0 = 6.28
1print(3.14 * 2.0)

Output

6.28
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.

  • .× 2
  • (× 1
  • )× 1
  • *× 1

More Swift examples at level 1

← Swift typing practice