Cod sursa(job #573493)
Utilizator | Data | 6 aprilie 2011 12:29:49 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.29 kb |
#include<fstream>
#include<string>
using namespace std;
ifstream in ("text.in");
int main (){
string s;
int a=0,b=0;
ofstream out ("text.out");
while(in.eof()){
in>>s;
b++;
a+=s.size();
}
a=a/b;
out<<a<<" ";
return 0;
}