Pagini recente » Borderou de evaluare (job #2159419) | Borderou de evaluare (job #2677303) | Cod sursa (job #1832292) | Borderou de evaluare (job #1159456) | Cod sursa (job #2274136)
#include <bits/stdc++.h>
using namespace std;
char ch[1000999];
int words,no;
int main()
{
ifstream fin ("text.in");
ofstream fout ("text.out");
fin.getline(ch,1000000);
int n=strlen(ch);
for (int i=0;i<n;++i)
{
if (isalpha(ch[i]))
{
words++;
while (isalpha(ch[i]) && i<n)
{
no++;
i++;
}
}
}
fout<<no/words<<"\n";
return 0;
}