diff options
-rw-r--r-- | stddev.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -33,7 +33,7 @@ int main(int,char **argv){ sort(data.begin(),data.end()); const double s_mean=total/data.size(); - const double s_mode=data[data.size()/2]; + const double s_median=data[data.size()/2]; total=0; for(double v : data){ @@ -43,5 +43,5 @@ int main(int,char **argv){ cout<<"Mean: "<<s_mean<<endl <<"Stddev: "<<s_stddev<<endl - <<"Mode: "<<s_mode<<endl; + <<"Median: "<<s_median<<endl; } |