// 統(tǒng)計一段字符串中的非元音字符個數(shù)
let useInput = "To write the code for class, you must provide three chunks or secetions of code."
var outputCount = 0
for chares in useInput.characters {
switch chares {
case "a", "e", "i", "o", "u":
// 跳出本次循環(huán) 直接回到條件判斷語句處
continue
default:
print(chares)
outputCount += 1
}
}
print(String(outputCount))