从ios swift中的模运算中获得结果

时间:2017-11-01 05:29:50

标签: ios swift swift3

我希望根据Google搜索的屏幕截图在 iOS Swift 3 中实现以下结果。 PFA如下 enter image description here

我尝试使用 iOS Swift 3 ,但在执行此操作时卡住了,请参阅代码

let resultAfterModulo: Int = (-3) % 24
print(resultAfterModulo)

输出: 的 -3

但输出应 21

有人可以帮我这个.. ??提前谢谢....

0 个答案:

没有答案
相关问题