欢迎来到牛牛题库网 牛牛题库官网
logo
全部科目 > 软件认证工程师考试 > 软件工程综合知识

单项选择题

编写一个过程countdown(n:Int),打印从n到0的数字?()

A.def countdown(n:Int){ 0 to n foreach print }
B.def countdown(n:Int){ (0 until n).reverse foreach print }
C.def countdown(n:Int){ (0 to n).reverse foreach print }
D.def countdown(n:Int){ (0 to n-1).reverse foreach print }

点击查看答案
微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题