Pagini recente » Cod sursa (job #1069313) | Cod sursa (job #1144747) | Cod sursa (job #2025300) | Cod sursa (job #3041953) | Cod sursa (job #1409112)
#include<cstdio>
#include<algorithm>
#include<cstring>
int n,i,l,nrc,ok;
char s,ch;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
while (scanf("%c",&s))
{
if (s=='\n') break;
if ((s<='Z' && s>='A') || ( s<='z' && s>='a' )) l++,ok=1;
else if (ok)
ok=0,nrc++;
ch=s;
}
if ((ch<='Z' && ch>='A') || ( ch<='z' && ch>='a' )) nrc++;
printf("%d",l/nrc);
return 0;
}