Answered step by step
Verified Expert Solution
Question
1 Approved Answer
It's February in Ohio, in fact, it's February everywhere, and that means it's cold in Ohio. We have been collecting data for the highest and
It's February in Ohio, in fact, it's February everywhere, and that means it's cold in Ohio. We have been collecting data for the highest and lowest daily temperature. We would like to enter this data, and have our program tell us the highest high temp and the lowest low temp so far, this month. program Write a program which will use a while loop to prompt and read the high and low temperatures for each day from the user. As you read in the high and low temp for a given day, save the highest high you have seen so far, and likewise the lowest low. Allow the user to end the loop by entering the sentinel value -100. When the user ends the loop, print out the highest and lowest temperature seen so far for the month of February note: Why do we use a while loop? We want our program to be flexible enough to allow the user to enter any number of days' worth of data, and to tell the program loop to stop with a sentinel value. Since we don't know in advance how many days of data they will enter, we use an indefinite loop - the while
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