Pagini recente » Cod sursa (job #1071793) | Cod sursa (job #2634071) | Cod sursa (job #571637) | Cod sursa (job #241054) | Cod sursa (job #383322)
Cod sursa(job #383322)
#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(ch!='\n')
{
scanf("%c",&ch);
if( lett(ch) )
{
++lit;
if(!lett(ex))
++cuv;
}
ex=ch;
}
printf("%d",lit/cuv);
return 0;
}