Cod sursa(job #569474)
Utilizator | Data | 1 aprilie 2011 15:43:43 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.37 kb |
#include<stdio.h>
int cuv,l;
bool y;
char x;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
y=false;
while(scanf("%c",&x)!=EOF)
{
if ((x>='a' && x<='z') || (x>='A' && x<='Z'))
{
++l;
y=true;
}
else
{
if(y==true)
++cuv;
y=false;
}
}
if (y==true)
++cuv;
printf("%d",l/cuv);
return 0;
}