0
1
2
3
4
5
6
大纲
let grade =100 let rank: String switch grade { case 0 ... 59: rank "F" case 60 ... 69: rank "D" case 70 ...79: rank "C" case 80 ...89: rank "B" case 90 ...100: rank "A" default: rank = "Invalid" }
扫描下方二维码手机阅读文章