Cod sursa(job #1365376)
Utilizator | Data | 28 februarie 2015 11:39:21 | |
---|---|---|---|
Problema | Text | Scor | 70 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.28 kb |
#include <iostream>
#include<fstream>
using namespace std;
string s;
int nr,nrc=0;
int main()
{
ifstream f("text.in");
ofstream g("text.out");
while(f>>s)
{
nr++;
nrc+=s.length();
}
g<<nrc/nr;
return 0;
}