Cod sursa(job #383322)
| Utilizator | Data | 16 ianuarie 2010 12:34:55 | |
|---|---|---|---|
| Problema | Text | Scor | 20 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.41 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(ch!='\n')
{
scanf("%c",&ch);
if( lett(ch) )
{
++lit;
if(!lett(ex))
++cuv;
}
ex=ch;
}
printf("%d",lit/cuv);
return 0;
}
