Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Design a Program that will that will record the weeks daily high and low temp

ID: 3621802 • Letter: 1

Question

1. Design a Program that will that will record the weeks daily high and low temperatures, calculate the average high temperature and the average low temperature.
2. There must either be two arrays, or one two dimensional array storing the week's daily high and low temperatures
3. This should repeat the entire program until the user requests to stop by inputting an N at the prompt.
4. Inputs, use variable names intemp, outemp and avgtemp, this way the program is clear.

o Town Name including Spaces

o 7 Daily High and Low Temperatures

o Y/N for another week

5. Outputs

o Average Daily High Temperature which is the sum of all Daily High Temperatures / 7
o Average Daily Low Temperature which is the sum of all Daily Low Temperatures / 7

6. The Screen output should appear as follows

Weekly Temperature Average

What is the name of the Town? Hickory Corners
What were the High and Low Temps for Day 1? 89 78
What were the High and Low Temps for Day 2? 90 77
What were the High and Low Temps for Day 3? 77 56
What were the High and Low Temps for Day 4? 62 58
What were the High and Low Temps for Day 5? 78 64
What were the High and Low Temps for Day 6? 76 65
What were the High and Low Temps for Day 7? 75 68

Report of this Weeks Temperatures for Hickory Corners
Day 1    Day 2   Day 3 Day 4 Day 5    Day 6    Day 7
89      90           77    62           78    76        75     High Temperature
78          77           56    58           64        65        68     Low Temperature

Average Daily High was 78.143 Degrees
Average Daily Low was 66.571 Degrees
Would you like to enter another week (Y/N)? N



Explanation / Answer

//LT1Jeff //Nov 22nd, 2011 //cramster solution #include #include using namespace std; const int SIZENAME=40; const int DAY=2; int i, j, sumin, sumout; int intemp[DAY]; int outtemp[DAY]; float avgintemp=0, avgouttemp=0; char town[SIZENAME]; char runagain; int main(){ cout