Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C# console program that will compute the average of 4 separate weeks of average weekly temperatures for any given month. Create a console

Write a C# console program that will compute the average of 4 separate weeks of average weekly temperatures for any given month. Create a console program where you will implement variables that are needed for this program and will implement the code within Main and any static methods that are called. You will need variables for temperature, minimum temperature, maximum temperature, average temperature, total of temperatures and a count variable. Use a loop to call a static void calculate method four times, passing temperature, minimum temperature, maximum temperature, average temperature and total temperature by reference and pass count by value. In the calculate method ask the user for a single temperature entry, add it to the total, determine the minimum and maximum temperature for the current call to the method and compute the current average. When the loop in Main has taken all four entries and done the calculations call a static void display method to display the output for the min, max and average temperature for the four entries. You will pass the min temp, max temp and average temp. You should format your output to look something like the following: Please enter the average temperature for week 1 of the month: 11 Please enter the average temperature for week 2 of the month: 22 Please enter the average temperature for week 3 of the month: 33 Please enter the average temperature for week 4 of the month: 44 The lowest temperature for the month was : 11 degrees. The highest temperature for the month was : 44 degrees. The average temperature for the month was: 27.5 degrees. Press any key to continue . . .

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_2

Step: 3

blur-text-image_3

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

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions

Question

8. Provide recommendations for how to manage knowledge.

Answered: 1 week ago

Question

5. Develop a self-management module for a training program.

Answered: 1 week ago