Cod sursa(job #1295630)
Utilizator | Data | 19 decembrie 2014 21:38:12 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.39 kb |
#include<stdio.h>
int len,nrcuv,ok;
char c;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
while(scanf("%c",&c)!=-1)
{
if((c>='a'&&c<='z')||(c>='A'&&c<='Z'))
{
len++;
ok=1;
}
else if(ok==1)
{
nrcuv++;
ok=0;
}
}
printf("%d",len/nrcuv);
return 0;
}