Question: Exercise 1 Write a program that repeatedly prints the value of the variable xValue, decreasing it by 0.5 each time, as long as xValue remains
Exercise 1 Write a program that repeatedly prints the value of the variable xValue, decreasing it by 0.5 each time, as long as xValue remains positive. Ask the user to enter the value. The value entered must be between 5 and 75 (inclusive). Use 2 while loops. The first loop is to validate the users input. The second loop is to print the xValue as described. Your output should display only 1 decimal places. The output must be in a table format as follows: xValue after adjustment ================= 75.0 37.5 18.8 9.4 Etc.. Use System.out.printf() to format the output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
