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

Need help to Create a program that asks the user to enter the high temp for for

ID: 3657922 • Letter: N

Question

Need help to Create a program that asks the user to enter the high temp for for each day of the week. Create a program that asks the user to enter the low temp for for each day of the week. Total the high temps and the low temps. Average the high temps and low temps. Display the average high and low. I need to use the web site in the title to complete the assignment. Here's what I have so far. var temp1 = parseInt(prompt(name+("-Enter a temp for 1st day!"))); var temp2 = parseInt(prompt(name+("-Enter a temp for 2nd day!"))); var temp3 = parseInt(prompt(name+("-Enter a temp for 3rd day!"))); var temp4 = parseInt(prompt(name+("-Enter a temp for 4th day!"))); var temp5 = parseInt(prompt(name+("-Enter a temp for 5th day!"))); var temp6 = parseInt(prompt(name+("-Enter a temp for 6th day!"))); var temp7 = parseInt(prompt(name+("-Enter a temp for 7th day!"))); var totaltemp = temp1 + temp2 + temp3 + temp4 + temp5 + temp6 + temp7; console.log(temp1 + " + " + temp2 + "= " + totaltemp);

Explanation / Answer

Okay so I made it a value returning function. I tried to make it an average, but i am not sure how to actually make the numbers in the two-dimensional array only add the high numbers to each other and the same for the low numbers. (Revised code) #include #include using namespace std; //******function prototypes******** int getTempsAvg(int xTemps[7][2]); int main () { //declare variables int temperatures = 0; //declare array int temps[7][2] = {0}; getTempsAvg(temps); temperatures = getTempsAvg(temps); system("pause"); return 0; } //*****Functions***** int getTempsAvg(int xTemps[7][2]) { int temperatures = 0; const int DAYS = 7; const int TEMPS = 2; for (int days = 0; days < 7; days ++) { cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote