Cod sursa(job #284587)
| Utilizator | Data | 21 martie 2009 20:15:32 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | contest01 | Marime | 0.45 kb |
#include<stdio.h>
#define fin "text.in"
#define fout "text.out"
char ch;
long cuv,lit;
int sw;
int main(void)
{
freopen(fin,"r",stdin);
freopen(fout,"w",stdout);
ch= getchar();
while(ch !=EOF)
{
sw=0;
while((ch>='a' && ch<='z') || (ch>='A' && ch<='Z'))
{
lit++;
sw++;
ch = getchar();
}
if(sw)
cuv++;
ch= getchar();
}
printf("%ld",lit/cuv);
return 0;
fcloseall();
}