Cod sursa(job #1070237)
Utilizator | Data | 31 decembrie 2013 13:54:45 | |
---|---|---|---|
Problema | Text | Scor | 40 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.28 kb |
#include<fstream>
#include<cstring>
using namespace std;
ifstream fin("text.in");
ofstream fout("text.out");
char x;
int l,n;
int main()
{
while(!fin.eof())
{
fin.get(x);
if((x>='A' && x<='Z')||(x>='a' && x<='z')) l++;
if(x==' ') n++;
}
fout<<l/n;
return 0;
}