Cod sursa(job #1365359)
Utilizator | Data | 28 februarie 2015 11:35:00 | |
---|---|---|---|
Problema | Text | Scor | 60 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.28 kb |
#include <iostream>
#include <fstream>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
string v[10000];
int i=1,u,n,k;
int main()
{
while (f>>v[i]) i++;
for (u=1;u<i;u++)
{n=n+v[u].length(); k++;}
g<<n/k;
return 0;
}