Cod sursa(job #561778)
Utilizator | Data | 21 martie 2011 17:32:30 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.32 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;
in.close();
out.close();
return 0;
}