Cod sursa(job #782202)

Utilizator ana.zetg wea tw ana.z Data 26 august 2012 12:11:17
Problema Text Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.37 kb
#include<stdio.h>
#include<string.h>
int s,poz,i,cuv,rrr=9999;
char c,cc;
int main()
{
	freopen("sume.in","r",stdin);
	freopen("sume.out","w",stdout);
	while(scanf("%c",&c)!=EOF)
	{
		cc=c;
		if(c<='A')
		{
			s+=poz;
			if(poz!=0)
			cuv++;
			poz=0;
			while(c<'A'&&scanf("%c",&c)!=EOF)
				rrr--;
			i--;
		}
		poz++;
	}
	printf("%d",s/cuv);
	return 0;
}