Cod sursa(job #577763)
Utilizator | Data | 10 aprilie 2011 16:20:37 | |
---|---|---|---|
Problema | Text | Scor | 10 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.35 kb |
#include<fstream>
using namespace std;
int main()
{int l,n,ok;
char s[300],p,x;
ifstream fin("text.in");
ofstream fout("text.out");
ok=n=0;
while(fin>>x)
{
if((x<='z'&&x>='a')||(x<='Z'&&x>='A'))
{
l++;
ok=1;
}
else
if(ok==1)
{
n++;
ok=0;
}
}
if(ok)
n++;
fout<<int(l/n);
return 0;
}