Cod sursa(job #566227)

Utilizator alexutzu29Alexandru Meterez alexutzu29 Data 28 martie 2011 19:51:17
Problema Text Scor 100
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.35 kb
#include <fstream>
#include <cstdio>
#include<stdio.h>

int main()
{
	freopen("text.in","r",stdin);
freopen("text.out","w",stdout);
char ch;
int len=0,cuv=0,k=0;
while(scanf("%c", &ch)!=EOF)
{if((ch>='a' && ch<='z') || (ch>='A' && ch<='Z'))
{
	len++;
	if(k==0)
		cuv++;
	k=1;
}
else k=0;
}
printf("%d",len/cuv);


	
return 0;	
}