Answered step by step
Verified Expert Solution
Question
1 Approved Answer
DR JAVA Write a program that includes the following while loops. Input radius (double) values and prints the diameter, circumference, and area of a circle.
DR JAVA
- Write a program that includes the following while loops.
- Input radius (double) values and prints the diameter, circumference, and area of a circle. The loop will stop executing when a 0 or negative value is entered. Declare a global constant for PI, where PI = 3.14159265. Be sure and echo the input and display all output to 3 decimal places.
- a second while loop that works as above, but instead asks the user if they want to enter radius (Y/N). What happens if you enter a negative radius?
- Input temperatures until 999 and print whether above or below freezing.
- Input temperatures until 999 and count number above and below freezing.
- Input temperatures until 999 and print the average temperature.
- Ask user if they want to enter a temperature and print whether above or below freezing.
- a while loop that repeatedly enters test scores (integer) (pick a sentinel) and counts the numbers of As, Bs, Cs, Ds, and Fs and also prints the average test score.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started