Cod sursa(job #532786)
Utilizator | Data | 12 februarie 2011 14:48:31 | |
---|---|---|---|
Problema | Text | Scor | 50 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.34 kb |
#include<fstream>
using namespace std;
int main()
{
char s;
long long n=0,m=0;
ifstream f("text.in");
ofstream g("text.out");
while(!f.eof())
{
f.get(s);
if(s==' ')
{
n++;
f>>s;
}
if((int(s)>=65&&int(s)<=90)||(int(s)>=97&&int(s)<=122)) m++;
}
n++;
g<<m/n;
return 0;
}