Cod sursa(job #2274139)
Utilizator | Data | 1 noiembrie 2018 14:16:25 | |
---|---|---|---|
Problema | Text | Scor | 10 |
Compilator | cpp-64 | Status | done |
Runda | Arhiva de probleme | Marime | 0.41 kb |
#include <bits/stdc++.h>
using namespace std;
char ch;
int words,no;
int main()
{
ifstream fin ("text.in");
ofstream fout ("text.out");
while (fin>>ch)
{
if (isalpha(ch))
{
words++;
while (isalpha(ch))
{
no++;
fin>>ch;
}
}
}
fout<<no/words<<"\n";
return 0;
}