Main Page   Class Hierarchy   Data Structures   File List   Data Fields   Globals  

stats.C

Go to the documentation of this file.
00001 
00002 #include "stdinc.h"
00003 
00004 main() {
00005 
00006     int n = 0;
00007     real x;
00008     real sum = 0;
00009 
00010     while (cin >> x) {
00011         n++;
00012         sum += x;
00013     }
00014 
00015     cout << "n, mean = " << n << " " << sum/n << endl;
00016 
00017 }

Generated at Sun Feb 24 09:57:17 2002 for STARLAB by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001