Cod sursa(job #1436330)
Utilizator | Data | 15 mai 2015 19:05:26 | |
---|---|---|---|
Problema | Text | Scor | 70 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.28 kb |
#include <fstream>
#include <string>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int main()
{
string s;
int i=0,sum=0;
while(f>>s)
{
sum+=s.length();
i++;
}
g<<sum/i;
return 0;
}