Hi quick question can you solve this for me cause I'm a little bit confuse about this one thanks! this is c++ and yes I'll give you a thumbs up thank you ^^
Write a program that reads in temperatures. Use a while loop (or a do..while loop, if you prefer, but the while loop might be easier). When the user enters -999, the loop exits. Then, print out the average temperature, the highest and the lowest temperature entered.
PROGRAM


OUTPUT

#include <iostream>
using namespace std;
int main()
{
float temp[100], max, min, average,sum=0;
int n,i;
cout<<"Enter the temperatures in
fahrenheit\n";
i=0;
do
{
cin>>temp[i];
i=i+1;
}while (temp[i-1] != (-999));
n=i;
for (i=0; i<n; i++)
{
sum = sum+
temp[i];
}
average = sum/n;
cout<<"\nThe average temperature is:
"<<average;
max=temp[0];
for (i=1;i<n;i++)
{
if (max <
temp[i])
max = temp[i];
}
cout<<"\nThe highest temperature is:
"<<max;
min= temp[0];
for (i=1;i<n;i++)
{
if (min> temp[i])
min= temp [i];
}
cout<<"\nThe lowest temperature is:
"<<min;
}
I hope this is what you are looking for.. Please rate this answer to let me know it was helpful to you.. Thanks for reading..
Hi quick question can you solve this for me cause I'm a little bit confuse about...
Hi im having trouble with this homework question. Can someone
show me how to do this in C++ with all the steps?
Weather Analysis WeatherAnalyzer - New Day Data 2- Good Days 3- Summary 0- Exit Step 0: You can get the sample file from this link: Each row in the text file represent weather measurement of a day. For each day, the file contains the temperature (first column), humidity (second column) and the wind (third column) values emp 70...
Hi. Could you help me with the code below? I need to validate the code below, using expressions that can carry out the actions or that make appropriate changes to the program’s state, using conditional and iterative control structures that repeat actions as needed. The unit measurement is missing from the final output and I need it to offer options to lbs, oz, grams, tbsp, tsp, qt, pt, and gal. & fl. oz. Can this be added? The final output...