subject

Write a while loop that prints usernum divided by 2 (integer division) until reaching 1. follow each number by a space. example output for usernum = 40:
20 10 5 2 1

import java. util. scanner;

public class dividebytwoloop {
public static void main (string [] args) {
int usernum;
scanner scnr = new scanner(system. in);
usernum = scnr. nextint();

/* your solution goes here */

system. out. println("");
}
}

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 18:30, yeeet26
If an improvement creates no significant change in a product’s performance, then it is a(n) ? a0 design improvement. (there are no answer choices)
Answers: 1
image
Computers and Technology, 22.06.2019 20:10, ianmartin6080
Assume that minutes is an int variable whose value is 0 or positive. write an expression whose value is "undercooked" or "soft-boiled" or "medium-boiled" or "hard-boiled" or "overcooked" based on the value of minutes. in particular: if the value of minutes is less than 2 the expression's value is "undercooked"; 2-4 would be a "soft-boiled", 5-7 would be "medium-boiled", 8-11 would be "hard-boiled" and 12 or more would be a "overcooked".
Answers: 1
image
Computers and Technology, 23.06.2019 11:00, la200564
How should you specify box sizes on a web page if you want the boxes to vary according to the font size of the text they contain? a. in pixels b. in inches c. as percentages d. in em units
Answers: 2
image
Computers and Technology, 25.06.2019 01:30, babyquinnz
Why is the most liked picture on instagram an eggy? owo
Answers: 1
You know the right answer?
Write a while loop that prints usernum divided by 2 (integer division) until reaching 1. follow each...

Questions in other subjects:

Konu
World Languages, 30.01.2020 17:47