Continue this process until the number equals 1 then


Question 1-

Write a program to request a positive integer as input and do the following:

If the number is even, (n Mod 2 == 0), divide it by 2. Otherwise, multiply by 3 and add 1. Continue this process until the number equals 1. Then display the number of repetitions the program required.

Question 2-

The world population doubled from 3 billion in 1959 to 6 billion in 1999. Assuming that the population doubles every 40 years, write a program to determine when the world's population was under 6 million.

Question 3-

The coefficient of restitution of a ball (between 0 and 1) specifies how much the ball will bounce upon impact with a rigid surface. For instance a ball with a coefficient of .8 means that it will bounce to 80% of its initial height after each bounce. Write a program to input a coefficient of restitution and an initial height in feet that determines how many bounces the ball will take before rising to a height of less than 1 inch. Also report the total distance traveled by the ball to that point.

Question 4-

Write a program to find the difference between the highest and lowest nonnegative values entered by a user through inputboxes. The user will be instructed to enter -1 to terminate the process of entering numbers.

Request for Solution File

Ask an Expert for Answer!!
Visual Basic Programming: Continue this process until the number equals 1 then
Reference No:- TGS0972486

Expected delivery within 24 Hours