Cod sursa(job #791944)
Utilizator | Data | 25 septembrie 2012 20:05:19 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | asem-etapa1 | Marime | 0.31 kb |
#include<stdio.h>
#include<string.h>
int s,Poz,i,Cuv;
char c;
int main()
{
freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
while(scanf("%c",&c)!=EOF)
{
if((c>='A'&&c<='Z')||(c>='a'&&c<='z'))
{
s++;
Poz=1;
}
else
if(Poz==1)
{
Cuv++;
Poz=0;
}
}
printf("%d",s/Cuv);
return 0;
}