1年前 (2016-08-17)  Swift  已收录 |   1 条评论  603 
文章评分 1 次,平均分 5.0
import UIKit
func season (month: String) ->String{
    switch month{
    case "March","April","May":
        return "Spring"
    case "June" ,"July","August":
        return "Summer"
    case "September","October","November":
        return "Autumn"
    case "December","January","February":
        return "Winter"
    default:
        return "Not valid"
    }
}
let month = "June"
season(month)
 

除特别注明外,本站所有文章均为搞机哥原创,转载请注明出处来自http://www.gaojig.com/archives/572.html

关于
搞机哥-爱搞机的程序猿

发表评论

  1. 感谢,收藏了

    lwglove 评论达人 LV.5 1年前 (2016-08-18) [0] [0]

切换注册

登录

忘记密码 ?

您也可以使用第三方帐号快捷登录

切换登录

注册

扫一扫二维码分享