Computers and Technology

5.10.4: Snake Eyes My code:

var SENTINEL = 1;

function start(){

var diceOne;

var diceTwo;

while(true) {
println("" + diceOne + "," + diceTwo);

diceOne = Randomizer. nextInt(1,6);

diceTwo = Randomizer. nextInt(1,6);

if (diceOne && diceTwo == SENTINEL){
println("" + diceOne + "," + diceTwo);

break;

}

}
}

What am I doing wrong here?

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 06:00, isalita
Pthe price of tickets in a group when a purchased in bulk can be found with the equation c=px+24 were c is the cost, p is the number of people, and x is the price per ticket. what is price of of each ticket if it costs $189 to buy tickets for 15 people ? a $8 b $24c $9d $11 show work
Answers: 1
image
Computers and Technology, 23.06.2019 15:30, yanicas
Hey so i was just trying out some game hacks so i took a paste from online and built it in my visual studio and then suddenly my computer was working or clicking on stuff on its own am i hacked?
Answers: 1
image
Computers and Technology, 23.06.2019 16:00, AM28
Does read theory have answers keys ?
Answers: 1
image
Computers and Technology, 25.06.2019 08:00, brandiewilliams12567
Astrategy for speeding up hard drive performance is
Answers: 2
Do you know the correct answer?
5.10.4: Snake Eyes My code:

var SENTINEL = 1;

function start(){

...

Questions in other subjects: