Cod sursa(job #331130)
Utilizator | Data | 12 iulie 2009 20:11:01 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.35 kb |
#include <cstdio>
#include <cstring>
int main()
{int lung=0,nr=0,i=0;
char c;
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
while(scanf("%c", &c)!=EOF)
{//scanf("%c",&c);
if (((c>='a') && (c<='z')) || ((c>='A')&& (c<='Z')) )
{lung++;
if (!i) {nr++;i=1;}
}
else i=0;
}
printf("%d",lung/nr);
return 0;}