Cod sursa(job #553094)
| Utilizator | Data | 13 martie 2011 16:24:11 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.39 kb |
#include<stdio.h>
#include<string.h>
int i,s,nr;
bool ok;
char ch,ch2=' ';
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
while (!feof(stdin))
{
scanf("%c",&ch);
if ((ch>='a'&&ch<='z')||(ch>='A'&&ch<='Z'))
{
s++;
ok=true;
}
else if (ok)
{
nr++;
ok=false;
}
}
if (ok) nr++;
printf("%d\n",s/nr);
return 0;
}
