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

Develop an algorithm to prompt for and obtain maximum daily temperatures for a w

ID: 3557794 • Letter: D

Question

Develop an algorithm to prompt for and obtain maximum daily temperatures for a whole year. However, in order to consider leap years, your algorithm should first prompt the user for the number of days in this particular year. That is, your algorithm should expect 365 or 366 as the first input number followed by input temperature values. In addition, for this particular year, your algorithm must also determine and display the average, maximum, and minimum of these temperatures values. Submission You need to submit your design (defining diagram) and algorithm.

Explanation / Answer

i=0; tempsum=0; tempmax=0; tempmin=100; currenttemp=0; no_days=0; // variables used to store values do (prompt user for number of days) no_days = user input while no_days!=365 or no_days!=366 // will loop until user enter 365 or 366 while i tempmax tempmax = currenttemp else if currenttemp