Question: Please help in Java Programming please include explanation if possible!! thanks in advance Create a program that takes a number and counts how many times

Please help in Java Programming

please include explanation if possible!!

thanks in advance

Create a program that takes a number and counts how many times it can be divided by 2 before it is smaller than 1. You will need to create a single int variable and stores a number in it that will be used and a second int variable as a counter. Then you will use a While loop and the counter to count how many times it divides (Don't forget to make the 2 a 2.0 when you divide). Finally print both the original number and the number of times it divided in a suer friendly format (as in make a sentance saying what each number you print is). The print statement MUST use the 2 variables or no credit will be awarded.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!