Question: Which of the following homework problems requires a conditional loop? Question 4 options: Write a program that lets the user enter a nonnegative integer and

Which of the following homework problems requires a conditional loop?
Question 4 options:
Write a program that lets the user enter a nonnegative integer and then uses a loop to calculate the factorial of that number.
Write a program with a loop that displays the projected semester tuition amount for the next 5 years.
Compute the average of the numbers from 1 to n (where n is a positive integer value) and assign it to the variable avg.
Write a loop that reads strings from standard input where the string is either "land", "air", or "water". The loop terminates when "xxxxx"(five x characters) is read in.

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 Programming Questions!