Cod sursa(job #37263)
Utilizator | Data | 24 martie 2007 19:07:53 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.32 kb |
#include<stdio.h>
#include<ctype.h>
#include<string.h>
char c[1000000];
int ok,nr,nc;
int main()
{freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
scanf("%s",c);
for(int i=0;i<strlen(c);i++)
if(isalpha(c[i])) {nr++;ok=1;}
else {nc=nc+ok;ok=0;}
printf("%d",nr/nc);
fclose(stdout);
return 0;}