subject

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?

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:30
Active listen eliminates barries to communication true or false
Answers: 1
question
Computers and Technology, 22.06.2019 15:30
What is a costume plot? why is it important to a film or theater production?
Answers: 2
question
Computers and Technology, 23.06.2019 15:20
What does a bonus object do? a. subtracts lives b. keeps track of a player's health c. gives a player an advantage d. makes text appear
Answers: 1
question
Computers and Technology, 24.06.2019 03:00
Using a conditional expression, write a statement that increments numusers if updatedirection is 1, otherwise decrements numusers. ex: if numusers is 8 and updatedirection is 1, numusers becomes 9; if updatedirection is 0, numusers becomes 7.
Answers: 1
You know the right answer?
5.10.4: Snake Eyes My code:

var SENTINEL = 1;

function start(){

...
Questions
question
Mathematics, 16.05.2020 07:57
question
Mathematics, 16.05.2020 07:57
Questions on the website: 13722363