Cod sursa(job #2211859)
Utilizator | Data | 12 iunie 2018 10:41:56 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.33 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin ("text.in");
ofstream fout ("text.out");
int l, cuv;
char ch;
int main()
{
while (fin.get(ch)) {
if (isalpha(ch)) {
cuv++;
while (isalpha(ch)) {
l++;
fin.get(ch);
}
}
}
fout << (double)l / cuv;
return 0;
}