Cod sursa(job #2068809)
Utilizator | Data | 18 noiembrie 2017 11:19:24 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | evaluare_cex_sv_cls_x | Marime | 0.4 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
char c;
int i, l=0, cv=0, cvv=0;
int main()
{
while (f.get(c)) {
if (isalpha(c)) cv++;
else {
if (cv) {
l=l+cv;
cvv++;
cv=0;
}
}
}
if (cvv) {
g<<l/cvv;
}
return 0;
}