Caffeine Script

Quiz

Complete the function caffeineBuzz, which takes a non-zero integer as it’s one argument.
If the integer is divisible by 3, return the string “Java”.
If the integer is divisible by 3 and divisible by 4, return the string “Coffee”
If the integer is one of the above and is even, add “Script” to the end of the string.
Otherwise, return the string “mocha_missing!”

我的解答:

大神解答:

此条目发表在算法与数据结构分类目录,贴了标签。将固定链接加入收藏夹。

发表评论

电子邮件地址不会被公开。 必填项已用*标注