Cod sursa(job #336586)
Utilizator | Data | 31 iulie 2009 20:23:34 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.43 kb |
#include <stdio.h>
char crc;
unsigned long total,cuv,ok;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
while(!feof(stdin))
{
scanf("%c",&crc);
if(crc>64&&crc<91||crc>96&&crc<123)
{
++total;
if(ok==0)
++cuv;
ok=1;
}
else ok=0;
}
printf("%u",total/cuv);
}