Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write an application that solves Programming Exercise 5-4 from the text. The application continuously prompts the user for a series of daily high temperatures (as

Write an application that solves Programming Exercise 5-4 from the text. The application continuously prompts the user for a series of daily high temperatures (as integers) until the user enters a sentinel value of 999. Valid temperatures range from -20 through 130 Fahrenheit (inclusive). When the user enters a valid temperature, add it to a total; when the user enters an invalid temperature, display the error message: "Valid temperatures range from -20 to 130. Please reenter temperature." Before the program ends, display the number of temperatures entered and the average temperature (with 1 digit of precision). Sample output is shown below: image text in transcribed

Enter temperatures from -20 to 130 (999 to stop) Enter temperature: abcd Valid temperatures range from -20 to 130. Please reenter temperature. Enter temperature: -21 Valid temperatures range from -20 to 130. Please reenter temperature. Enter temperature: 131 Valid temperatures range from -20 to 130. Please reenter temperature. Enter temperature: 1ee Enter temperature: 90 Enter temperature: 95 Lab 5 Output Enter temperature: 999 You entered 4 valid temperatures. The mean temperature is 95.5 degrees. Press any key to continue . . . 8 Remember, use Debug, Start Without Debugging (CTRL-F5) to run your Console application. 5. Remember, the comments required for each file include your Grading ID (not your name nor your Student ID!!, lab number, due date, course section, and brief description of what the program does. Be sure to add this information in camments at the top of your lab's code file (above where the Using statements are located). Put a series of line comments or one block comment (see p. 18-19 for examples of these) at the very top of the file (starting at line 1). 6. When finished, close Visual Studio but remember where you saved your project. 7. Open Windows Explorer and browse to your project's location. You should find a folder named "LabS" that contains all yaur project's files and folders (including a file named "Lab5.sln"). Return to the top-level of your project's location, so that the folder named "Lab5" with all your project's files and folders) is visible. 8. Next, we will create a compressed ZIP archive of the entire project. The steps for doing this will vary somewhat based on the ZIP utility being used. These instructions assume you using the 7-Zip compression utility but there are many tools such as WinZip and WinRAR available online. 9. Right-click on the "Lab5" folder and the context menu will appear. Choose 7-Zip and then Add to "Lob5.zip" .This will create and name the archive as "Lab5.zip". If you don't see an appropriate option in the context menu, ask your instructor or lab assistant for help. 10. Before you upload this ZIP file, it's a good idea to make sure that everything was praperly zipped. Again, these instructions assume

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

ISBN: 0132742926, 978-0132742924

More Books

Students also viewed these Databases questions