标签: swift
万有引力常数
G = 6,6726 * 10 ^ -11
如何用Swift编程语言表达这个?
答案 0 :(得分:2)
请尝试以下代码:
let g = 6.6726e-11
https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/TheBasics.html#//apple_ref/doc/uid/TP40014097-CH5-ID323