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: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 18:30, leannhb3162
Which of these options are the correct sequence of actions for content to be copied and pasted? select content, click the copy button, click the paste button, and move the insertion point to where the content needs to be inserted. click the copy button, select the content, move the insertion point to where the content needs to be inserted, and click the paste button. select the content, click the copy button, move the insertion point to where the content needs to be inserted, and click the paste button. select the content, move the insertion point to where the content needs to be inserted, click the copy button, and click the paste button.
Answers: 3
image
Computers and Technology, 22.06.2019 19:10, hgdthbgjnb83661
What a backup plan that you have created in a event you encounter a situation
Answers: 2
image
Computers and Technology, 23.06.2019 02:00, rah45
Which of the following is not a source of sustainable raw materials? a) coal mine b) flick of sheep c) cotton plantation d) line forest.
Answers: 2
image
Computers and Technology, 23.06.2019 15:30, PlzNoToxicBan
The song about casey jones a railroad engineer who gives his life on the job would most likely gall under the folk song category of? a-work song b-nonsense song c-religious song d-ballad
Answers: 1
Do you know the correct answer?
5.10.4: Snake Eyes My code:

var SENTINEL = 1;

function start(){

...

Questions in other subjects:

Konu
Mathematics, 22.11.2019 02:31