Pagini recente » Istoria paginii runda/baraj-ichb2021/clasament | Cod sursa (job #2933431) | Cod sursa (job #1444373) | Cod sursa (job #310969) | Cod sursa (job #301878)
Cod sursa(job #301878)
#include<stdio.h>
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
char c;
long s=0,sz=0,k,ok=0;
while (scanf("%c",&c)!=EOF)
{
if ((c>='a' && c<='z') || (c>='A' && c<='Z'))
{
s++;
if (!ok)
sz++;
ok=1;
}
else
ok=0;
}
if (sz)
{ k=s/sz;
printf("%ld",k);
}
else printf("0");
return 0;
}