Cod sursa(job #508097)
Utilizator | Data | 7 decembrie 2010 15:57:57 | |
---|---|---|---|
Problema | Text | Scor | 90 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.35 kb |
#include<stdio.h>
long nrlit , nrcuv , ok;
char a;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
while(scanf("%c",&a)!=EOF)
{
if( (a>='a' && a<='z') || (a>='A' && a<='Z') )
{
ok=1;
nrlit++;
}
else
if(ok==1)
{
ok=0;
nrcuv++;
}
}
printf("%ld",nrlit/nrcuv);
return 0;
}