Write a C++ program to enter 24 readings of tempe
rature (each reading is between
and 45), compute and print out the average temperature, maximum temperature and
minimum temperature of the day. Enforce the necessary validation on the user input.
Use proper format for the output.
Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga.
Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus.
Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
eh? do you have your current attempt? I see decalrations, functions, and while and if loops...
so how is it solved ???
trying to write one now. lol i'm using asking user input to be put into arrays.
though i would rather write in python. lol
seems like it's working.
Not the answer you are looking for? Search for more explanations.
while (cin.get() != '\n') ;
this is the main function where iteration is used to place the values.
note that the array simply has 2 values. since i<2. edit this to include 24 values.
after putting them in an array, add them together with a while or for function before dividing them by their total number.
for max, just write an auto update function that will update when there is a number that is larger than before.