this is the question
6. Create a class called Statistic. This class will contain a function called printStatistics that accepts a single integer parameter and returns nothing. Function printStatistics will use the value that was passed to it in order to calculate and print the average, sum, highest and lowest of several integers (the number of integers will be determined by the value of the parameter). For example, if we did something like this:
printStatistics(5), this means that our function needs to find the average, sum, highest and lowest of 5 numbers. To do this, it is advisable to use a loop of some kind that runs 5 times (since the parameter is 5). If the parameter was some other value, then your loop would run that many times. Inside your loop you will need to keep asking the user for a value. You will need to keep track of these values so you can find the sum, average etc. As a hint towards finding the largest and smallest values, you can create two variables, min and max and then assign them both the first value that the user enters. However, you must do this before you enter the loop’s body. Also, since you have gotten the first value from the user, your loop will run one less time. Now, once you are in the body of the loop, ask for a new value and then compare it against both min and max. If the value you just input is larger than max, then max will be assigned this new value. If the value you just input is smaller than min, then min will be assigned this new value. No than Then, run your loop one less time. Of course, you will need to also figure out how to determine sum and average.
this is what i have
{
int sum;
int average;
int maximum;
int minimum;
int i = 0;
cout << "The maximum number is: " << endl;
maximum = i;
for (i = 1; i++)
{
if (i > maximum)
maximum = i;
}
cout << maximum << endl;
cout << "The minimum number is: " << endl;
minimum = i;
for (i = 1; i--)
{
if (i < minimum)
minimum = i;
}
cout << minimum << endl;
sum = ()
cout<<"sum is"<<sum<<endl;
average = ()
cout<<"average is" average<<endl;
}