Your question is vague - what is your program supposed to do exactly?
And I don't see int v and int n actually declared anywhere. I doubt your code even compiles. And if (i<i+1) will always be true, why bother with an if statement? And if you know what min and max are why do you need to calculate them?
it compiles without the last 2 methods calcMax and calcMin. I don't know what to put in the 2 methods in order to output the max and min values the user inputs. i know they are simply the 1st and last numbers in the method for sorting them
my program needs to output mean,median,max,min through separate methods. therefore, i don't know what to put into the max and min methods so i can output the min and max in the main as i have the mean and median working. the i<i+1 i clearly am confused at that point and don't know what to do in the two methodsfor the max and min
agnophilo look at his code..they are the parameters of his functions calcMax and calcMin.
and as far as max and min..there is this really neat function in the algorithm header called max_element , min_element.
for your calcMax do something like this. return( std::max_element( v.begin() , v.end() ); );
instead of what you have and the same thing but with min_element for your calcMin.
they are under the algorithm library part of the stl container
I sent the links to them. And you can use .h headers in c++ but most people use .hpp I just meant it as a precompiled library I forgot what they are called.