Cod sursa(job #444891)
Utilizator | Data | 21 aprilie 2010 23:32:45 | |
---|---|---|---|
Problema | Text | Scor | 90 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.36 kb |
#include<fstream>
using namespace std;
char x;
long i,n,m,ok=1;
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;
}