about | help | code help+videos | done | prefs |
kLottery
Kehillah lottery ticket has three integers printed on it: a, b, and c. You win according to the following rules, checked sequentially in order: 1. If two numbers or more are the same, and all the numbers are above 10, you win $20. 2. If three numbers are the same, and are below 15, you win $40. 3. If all numbers are different, you win $30. Otherwise, you do not win anything. Write a function that returns your winnings. kLottery(27, 27, 30) → 20 kLottery(27, 27, 9) → 0 kLottery(28, 28, 28) → 20 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 100
Copyright Nick Parlante 2017 - privacy