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

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:00
If you have a lien on your vehicle, you cannot apply for a duplicate copy of your vehicle’s certificate of title. true or false
Answers: 1
question
Computers and Technology, 22.06.2019 00:30
Advantages and disadvantages of binary system
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
Jason needs to learn a new web tool. he went through his books to understand more about it. now he wants hands-on experience with using that tool. what would him? jason can use websites where workspace is provided to test the results of your code.
Answers: 2
question
Computers and Technology, 23.06.2019 09:30
Why is an outfitting a workspace with video games in a technology development company considered a strategic use of money
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
question
Mathematics, 19.10.2019 14:00
question
Mathematics, 19.10.2019 14:00
question
History, 19.10.2019 14:00
question
Biology, 19.10.2019 14:00
Questions on the website: 13722363