Cod sursa(job #329870)
Utilizator | Data | 7 iulie 2009 21:28:00 | |
---|---|---|---|
Problema | Text | Scor | 70 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.48 kb |
#include <stdio.h>
char crc,tmp;
unsigned long total, cuv,ok,oktmp;
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<122)
{
++total;
ok=1;
}
else ok=0;
if(ok==0&&oktmp==1)
++cuv;
tmp=crc;
oktmp=ok;
}
printf("%d",total/cuv);
}