import Foundation
let useInput = "To write the code for class , you must provide three chunks or sentions of code"
var OutputCount = 0
for chares in useInput {
switch chares {
case "a","e","i","o","u":
continue
default:
OutputCount++
}
}
print(String(OutputCount))
提示错误:
type string does not conform to protocol sequencetype
请问如何修改呀?
这是书上的源代码呀,难道是Swift语法又修改了?