The-Swift-2.0-Programming-Language-playground
The-Swift-2.0-Programming-Language-playground copied to clipboard
1.最大最小值的判定写错了
1.错误位置 if value < currentMin { currentMin = value } else { currentMax = value } } 2.个人的更改方法 //1.方法一
for index in 0..<array.count {
let tem = array[index];
print(tem)
if tem < currentMin {
currentMin = tem
} else {
if tem > currentMax {
currentMax = tem
}
}
}