Cod sursa(job #103917)

Utilizator gabor_oliviu1991gaboru corupt gabor_oliviu1991 Data 15 noiembrie 2007 19:23:37
Problema Text Scor 70
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.39 kb
#include<fstream.h>
#include<string.h>
int main(){
char a[65535];
unsigned int s=0,k=0,i,y=0,x;
ifstream f("text.in");
ofstream g("text.out");
while(!f.eof())
	       {
	       f>>a;
	       for(i=0;i<strlen(a);i++)
		{
		if(a[i]>65&&a[i]<122)
			{ while(a[i]>65&&a[i]<122)
			       {k++;i++;}
			  y++;s+=k;
			}
		k=0;
                }

		}

x=s/y;
g<<x;
return 0;
}