about | help | code help+videos | done | prefs |
diceDoublesOrLucky7
boolean diceDoublesOrLucky7(int n1, int n2). A dice cube has 6 sides, with the numbers 1-6. Given two integers that represent a pair of dice, return true if you rolled doubles, i.e. if the two dice show the same number. Also return true if the dice numbers add up to 7. Otherwise return false. diceDoublesOrLucky7(1, 1) → true diceDoublesOrLucky7(1, 5) → false diceDoublesOrLucky7(1, 6) → true ...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