Pagini recente » Cod sursa (job #38766) | Cod sursa (job #2801939) | Cod sursa (job #2267463) | Cod sursa (job #1922595) | Cod sursa (job #170625)
Cod sursa(job #170625)
# include <stdio.h>
# include <string.h>
long int k,l,ok,i,q;
char a[1000000],x;
int main ()
{
freopen ("text.in","r",stdin);
freopen ("text.out","w",stdout);
while (scanf ("%s",&a)&& x!='\n')
{
if (scanf ("%c",&x))
for (i=0;i<strlen(a);i++)
{q=0;
if ((a[i]>='a' && a[i]<='z') || (a[i]>='A' && a[i]<='Z'))
{
k++;
ok=1;
q=1;
}
else
if (ok==1)
{
l++;
ok=0;
}
}
if (q==1)
l++;
}
printf ("%li",k/l);
return 0;
}