Cod sursa(job #383323)
| Utilizator | Data | 16 ianuarie 2010 12:37:12 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.4 kb |
#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;
}
