Cod sursa(job #283231)
Utilizator | Data | 18 martie 2009 21:18:54 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.45 kb |
#include<fstream.h>
ifstream fin("text.in");
ofstream fout("text.out");
char a;
long c,e,i;
int k=0;
int main()
{ while(!fin.eof())
{ fin.get(a);
if((a>='a'&&a<='z')||(a>='A'&&a<='Z'))
{ c++;
if(k==0) e++;
k=1;
}
else k=0;
}
fout<<c/e;
fin.close();
fout.close();
return 0;
}