home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_10_07
/
1007054b
< prev
next >
Wrap
Text File
|
1992-05-06
|
221b
|
18 lines
#include <iostream.h>
int main()
{
double d;
double total = 0;
int n = 0;
while (cin >> d)
{
cout << d << '\n';
total += d;
++n;
}
cout << "average = " << total/n << '\n';
return 0;
}