So i have an assignment of asking the user for five positive integers and then declaring the max, min, geometric mean, and the arithmetic mean of the user's number.
I have compiled the program so far;
# include <iostream>
# include <cmath>
# include <string>
using namespace std;//
int main ( ) {
cout<<"Biggest Number is: "<<max<<endl;
if (a<b && a<c && a<d && a<e)
{min = a;}
if (b<c && b<d && b<e && b<a)
{min = b;}
if (c<a && c<b && c<d && c<e)
{min = c;}
if (d<a && d<b && d<c && d<e)
{min = d;}
if (e<a && e<b && e<c && e<d)
{min = e;}
double k=a*b*c*d*e;
cout<<"Smallest Number is: "<<min<<endl;
cout<<"Arithmetic mean: "<<(a+b+c+d+e)/5<<endl;
cout<<"Geometric mean: "<<pow(k,0.2)<<endl;
cout<<"Harmonic mean: "<<5/((1/a)+(1/b)+(1/c)+(1/d)+(1/e));
return 0;
}
However when i try to run it, it compiles on jGrasp, and on Codepad.org, but on my college blackboard account; it gives me a 0 because it is incorrect. Any suggestions?