| about | help | done | prefs | create account |
Java > Logic-1 > withoutDoubles
prev | next | chance
| Return the sum of two 6-sided dice rolls, each in the range 1..6. However, if noDoubles is true, if the two dice show the same value, increment one die to the next value, wrapping around to 1 if its value was 6.
withoutDoubles(2, 3, true) → 5 withoutDoubles(3, 3, true) → 7 withoutDoubles(3, 3, false) → 6 ...Save, Compile, Run See also Java Example Code. Java help docs: If Boolean Logic | Strings | While and For Loops | Arrays and Loops |
Forget It! -- delete my code for this problem
New just for fun
Random User Progress Graphs
Random Epic Graphs
151.0
Copyright Nick Parlante 2006-11 - privacy