Cod sursa(job #561776)
Utilizator | Data | 21 martie 2011 17:29:53 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.28 kb |
#include<fstream>
#include<string>
using namespace std;
ifstream in ("text.in");
ofstream out ("test.out");
int main (){
int n=0,nr=0;
string s;
while(!in.eof()){
in>>s;
n+=s.size();
nr++;
}
n=n/nr;
out<<n;
return 0;
}