Cod sursa(job #444887)
Utilizator | Data | 21 aprilie 2010 23:14:55 | |
---|---|---|---|
Problema | Text | Scor | 80 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.36 kb |
#include<fstream>
using namespace std;
char x;
long i,n,m,ok=0;
int main()
{
ifstream f("text.in");
ofstream g("text.out");
while(!f.eof())
{
f.get(x);
if((x>='a'&&x<='z')||(x>='A'&&x<='Z'))
{
ok=0;
m++;
}
else
if(!ok)
{
n++;
ok=1;
}
}
g<<m/n;
return 0;
}