# Swift Int Division is special

Every print statement below yields 0.0

```
var c:Double = 0.0
let a:Int = 1
let b:Int = 5
print("a/b = \(Double(a/b * 100))")
c = Double(a/b * 100)
print("c = \(c)")
```

Written on March 24, 2018

Senior Member of Technical Staff in Test at Oracle, Hobbyist iOS Developer

Every print statement below yields 0.0

```
var c:Double = 0.0
let a:Int = 1
let b:Int = 5
print("a/b = \(Double(a/b * 100))")
c = Double(a/b * 100)
print("c = \(c)")
```

Written on March 24, 2018