Write a program in which you create an array with 250 elements. Populate the array with random real numbers between 1 and 100. Using the statistics library, calculate and output the following values: maximum, minimum, mean, standard deviation, and variance. Next, sort the array and output the median value.
I'm basically new to C++ and taking this 6 week course is killing me, I would greatly appreciate all of your help. This is what I have so far:
int main ()
{
int A[250],i;
for (i=0;i<250;i++)
{
A[i]= (rand()%100)+1;
cout<<A[i]<<endl;}
}
//I've just been able to put together an array with random numbers thus far.
// How can I find the min/max/mean/sd/variance?
// I should also mention that I don't really know how to call the functions.