Pagini recente » Cod sursa (job #564892) | Cod sursa (job #545719) | Cod sursa (job #2907146) | Cod sursa (job #1847535) | Cod sursa (job #383323)
Cod sursa(job #383323)
#include<stdio.h>
bool lett( char x )
{
if( x>='a' && x<='z' )
return 1;
if( x>='A' && x<='Z' )
return 1;
return 0;
}
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
char ex=0,ch=0;
int cuv=0,lit=0;
while(scanf("%c",&ch)!=EOF)
{
if( lett(ch) )
{
++lit;
if(!lett(ex))
++cuv;
}
ex=ch;
}
printf("%d",lit/cuv);
return 0;
}