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, 21.06.2019 18:00
What is stored in str after the following code executes? string str = "computer science"; int i = 0; while (i < 8) { if (str.indexof("m") < i) { str = str.substring(0, 2) + str; } i += 2; } computer science cocomputer science cococomputer science cocococomputer science computer scienceco
Answers: 3
question
Computers and Technology, 22.06.2019 06:30
This technology is used to produce high-quality documents that look good on the computer screen and in print. wiki presentation paint desktop publishing
Answers: 3
question
Computers and Technology, 23.06.2019 09:30
Name the range function that would generate the following list of integers values: 0,1,2,3,4,5.
Answers: 1
question
Computers and Technology, 23.06.2019 14:30
Norder to receive financial aid at his vocational school, mario must fill out the fafsa. the fafsa is a form that must be completed to determine . in order to complete a fafsa, you must submit . the fafsa can students obtain
Answers: 2
You know the right answer?
5.10.4: Snake Eyes My code:

var SENTINEL = 1;

function start(){

...
Questions
question
Mathematics, 16.09.2020 04:01
question
Mathematics, 16.09.2020 04:01
question
Mathematics, 16.09.2020 04:01
question
Mathematics, 16.09.2020 04:01
question
Social Studies, 16.09.2020 04:01
question
Mathematics, 16.09.2020 04:01
question
Mathematics, 16.09.2020 04:01
question
Mathematics, 16.09.2020 04:01
question
Social Studies, 16.09.2020 04:01
question
Chemistry, 16.09.2020 04:01
question
Mathematics, 16.09.2020 04:01
question
Mathematics, 16.09.2020 04:01
question
Mathematics, 16.09.2020 04:01
question
Mathematics, 16.09.2020 04:01
question
Social Studies, 16.09.2020 04:01
question
Mathematics, 16.09.2020 04:01
question
Mathematics, 16.09.2020 04:01
question
Mathematics, 16.09.2020 04:01
question
Mathematics, 16.09.2020 04:01
question
Mathematics, 16.09.2020 04:01
Questions on the website: 13722362