Cod sursa(job #281192)
Utilizator | Data | 13 martie 2009 21:26:59 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.28 kb |
#include<fstream>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int main()
{
char a;
unsigned int c=0,l=0;
while(f>>a)
{
if((a>=97 && a<=122) || (a>=65 && a<=90)) l++;
if(a==' ') c++;
}
g<<l/c;
f.close();
g.close();
return 0;
}