Question
C Programmimg: (Program using arrays) Global warming. As part of a global warming analysis, a research facility tracks outdoor temperatures at the North Pole once
C Programmimg: (Program using arrays) Global warming. As part of a global warming analysis, a research facility tracks outdoor temperatures at the North Pole once a day, at noon, for a year. At the end of each month, these temperatures are entered in to the computer and processed. The operator will enter 28, 29, 30, or 31 data items, depending on the month. You may use -500 as a sentinel value after the last temperature, since that is lower than absolute 0. Your main program should call the read_temps(), hot_days(), and printTemps() functions described here:
1. read_temps() has one parameter, an array called temps, in which to store the temperatures. Read the real data value for one month and store them into the slots of an array. Return the actual number of temperatures read as the result of the function.
2. hot_days(), that has two parameters: the number of temperatures for the current month and an array in which the temperatures are stored. Search through the temp array and count all the days on which the noon temp exceeds 32. Return this count.
3. print_temps(), with the same two parameters plus the count of hot days. Print a neat table of temps. At the same time, calculate the average temperature for the month and print it at the end of the table, followed by the number of hot days.
PLEASE use
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