Computers and Technology

/* write a method named makeguesses that will guess numbers between 1 and 50 * inclusive until it makes a guess of at least 48. it should report each * guess and at the end should report the total number of guesses made. */public void makeguesses() { int count = 0; random r = new random(); int guess; do { guess = 1 + r. nextint(50); count++; system. out. println("guess = " + guess); } while(guess < 48); system. out. println("total guesses = " + count); }

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 23:00, cchotshot
Is an attack that relies on guessing the isns of tcp packets
Answers: 2
image
Computers and Technology, 23.06.2019 22:00, rocksquad9125
Take a critical look at three gui applications you have used—for example, a spreadsheet, a word-processing program, and a game. describe how well each conforms to the gui design guidelines listed in this chapter.
Answers: 3
image
Computers and Technology, 24.06.2019 00:00, BluedragonKBT44
The gene form of a trait is called a(n) 
Answers: 2
image
Computers and Technology, 24.06.2019 10:10, nakeytrag
Which view in a presentation program displays a split window showing the slide in the upper half and a blank space in the lower half?
Answers: 1
Do you know the correct answer?
/* write a method named makeguesses that will guess numbers between 1 and 50 * inclusive until it ma...

Questions in other subjects:

Konu
English, 26.05.2021 19:10