Cod sursa(job #1501479)
Utilizator | Data | 13 octombrie 2015 15:50:09 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.49 kb |
#include <cstdio>
#include <cctype>
using namespace std;
int cuv,nrlit;
char c;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
do
{
scanf("%c",&c);
if (!isalpha(c))continue;
nrlit++;
while(isalpha(c))
{
scanf("%c",&c);
if (!isalpha(c))break;
nrlit++;
}
cuv++;
}
while(!feof(stdin));
printf("%d\n",nrlit/cuv);
return 0;
}