Pagini recente » Cod sursa (job #601717) | Cod sursa (job #954496) | Cod sursa (job #1206961) | Cod sursa (job #743749) | Cod sursa (job #195294)
Cod sursa(job #195294)
# include <stdio.h>
# include <string.h>
long int k,l,ok,i,q;
char a[50000],x;
int main ()
{
freopen ("text.in","r",stdin);
freopen ("text.out","w",stdout);
fread (a,1000,1,stdin);
q=0;
for (i=0;i<strlen(a);i++)
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;
}