Cod sursa(job #382434)
Utilizator | Data | 13 ianuarie 2010 18:01:44 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.37 kb |
#include<stdio.h>
inline bool pac(char c)
{
return(c>='a' && c<='z' || c>='A' && c<='Z') ;
}
int main()
{
char n;
int lit=0,cuv=0;
int s=0;
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
while(scanf("%c",&n)!=EOF)
{
if(pac(n)==true)
{
lit++;
if(s==0)
cuv++;
s=1;
}
else
s=0;
}
printf("%d",lit/cuv);
}