gpt4 book ai didi

ios - 如何在swift中使用for in循环递减条件?

转载 作者:可可西里 更新时间:2023-11-01 00:05:27 25 4
gpt4 key购买 nike

我可以通过这段代码在 Swift 中使用 for in 循环

   for i in 0..<5
{
print ("Four multiplied by \(i) results in \(i*4)" )
}

但是我如何使用 for with less than ">"条件。

  for i in 10>..5
{
print ("Four multiplied by \(i) results in \(i*4)" )
}

它显示错误:“>”不是后缀一元运算符因为我在 10>..5

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com