Cod sursa(job #708640)

Utilizator VladutZ94FMI Chichirau Vlad Vasile VladutZ94 Data 7 martie 2012 00:09:25
Problema Text Scor 20
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.35 kb
#include <string.h>
#include <cstdio>


using namespace std;

int n,i,j;


int main()
{
	freopen("text.in","r",stdin);
	freopen("text.out","w",stdout);
	char c;
	scanf("%C",&c);
	while(c!='\n')
	{
		if((c>='a'&&c<='z')||(c>='A'&&c<='Z'))
			n++;
		if(c==' '||c=='-')
			j++;
		scanf("%c",&c);
	}
	printf("%d",n/j);
	return 0;
}