Cod sursa(job #487895)
Utilizator | Data | 26 septembrie 2010 20:10:33 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.28 kb |
#include<fstream.h>
ifstream fin("text.in");
ofstream fout("text.out");
int o,k,contor,lung;
char c;
int main()
{
while(fin.get(c))
{
if((c>='a'&&c<='z')||(c>='A'&&c<='Z'))
lung++,k++;
else
if(k)
o++,k=0;
}
if(k)
o++;
fout<<lung/o;
return 0;
}