Created
November 22, 2018 02:11
-
-
Save tomcha/8d08f027697b4055657e7ec47d0088a6 to your computer and use it in GitHub Desktop.
Swiftでの小数計算
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
var i : Int = 0 | |
var f : Float = 0.0 | |
for _ in (1...10) { | |
f += 0.1 | |
i += 1 | |
} | |
print(f) | |
print (i) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment