id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

srp4379@lausd.net quiz3 > diceDoublesOrLucky7
prev  |  next  |  chance

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)

boolean diceDoublesOrLucky7(int n1, int n2) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 100

Copyright Nick Parlante 2017 - privacy