style: use string interpolation in print

This commit is contained in:
nuomi1
2023-01-08 20:54:40 +08:00
parent 3b52df2a8f
commit f3e9c2cf89
3 changed files with 16 additions and 16 deletions

View File

@@ -2683,8 +2683,8 @@ $$
let n = 100
let nums = randomNumbers(n: n)
let index = findOne(nums: nums)
print("数组 [ 1, 2, ..., n ] 被打乱后 =", nums)
print("数字 1 的索引为", index)
print("数组 [ 1, 2, ..., n ] 被打乱后 = \(nums)")
print("数字 1 的索引为 \(index)")
}
}
```