Cod sursa(job #793089)
Utilizator | Data | 1 octombrie 2012 21:58:13 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | 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;
}