Pagini recente » Cod sursa (job #209419) | Cod sursa (job #1479063) | Cod sursa (job #1392353) | Cod sursa (job #2830667) | Cod sursa (job #196668)
Cod sursa(job #196668)
# include <stdio.h>
# include <string.h>
long int k,l,ok,i,q,y;
char c;
float z,x,p;
int main ()
{
freopen ("text.in","r",stdin);
freopen ("text.out","w",stdout);
q=0;
while (scanf ("%c",&c)!=EOF)
if ((c>='a' && c<='z') || (c>='A' && c<='Z'))
{
k++;
ok=1;
q=1;
}
else
if (ok==1)
{
l++;
ok=0;
}
if (q==1)
l++;
printf ("%li",k/l);
return 0;
}