Pagini recente » Cod sursa (job #854200) | Cod sursa (job #445444) | Cod sursa (job #2177703) | Cod sursa (job #2385854) | Cod sursa (job #195790)
Cod sursa(job #195790)
# 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++;
y=k/l;
z=k;
x=l;
p=z/x;
if (p<y+0.5)
printf ("%li",y);
else
printf ("%li",y+1);
return 0;
}