From d71b1fe6d65e72f9a4f3f81ffe06124d1f60458c Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Wed, 17 May 2017 20:36:38 +0200 Subject: Output number of input points --- stddev.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stddev.cpp b/stddev.cpp index b652b8a..ee36af4 100644 --- a/stddev.cpp +++ b/stddev.cpp @@ -32,6 +32,7 @@ int main(int,char **argv){ sort(data.begin(),data.end()); + const double s_count=data.size(); const double s_mean=total/data.size(); const double s_median=data[data.size()/2]; @@ -42,7 +43,8 @@ int main(int,char **argv){ const double s_stddev=data.size()==1?nan(""):sqrt(total/(data.size()-1)); const double s_stderr=s_stddev/sqrt(data.size()); - cout<<"Mean: "<