Cod sursa(job #425166)

Utilizator mening12001Andrei Geogescu mening12001 Data 25 martie 2010 15:50:20
Problema Text Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.34 kb
#include<iostream.h>
#include<string.h>
#include<fstream.h>
int main()
{char a,b[1000000];
long k=0,c=0,i=0;

ifstream f("text.in");
ofstream g("text.out");
while(!f.eof())
{f.get(a);
if(isalpha(a))
	{b[i]=a;
i++;k++;}
else
	{if(b[i-1]!='*')
				{b[i]='*';c++;
i++;}}}
if(b[0]!='*')
	cout<<k/c;
else
	cout<<k/(c-1);
			return 0;}