Write C Program Three Functions First Writes File Temperatures Recorded 30 Days Month Seco Q37136055

Write a c++program that has three functions. The first writes toa file the temperatures recorded over 30 days of a month. Thesecond function reads data from the file into an array. The third,calculates and displays the average, maximum and minimumtemperatures recorded for the month. The main program presents theuser with a menu of two choices: 1. Save temperature data & 2.Calculate statistics Both choices start by asking the user for thefile name (to write to in the first choice and to read from in thesecond choice)


Solution


#include <iostream>
#include <fstream>
#include<string.h>

using namespace std;

class Temperature{

private:
int temperature[30]; //array to store temperature of 30

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.