Cod sursa(job #849051)
| Utilizator | Data | 6 ianuarie 2013 00:19:02 | |
|---|---|---|---|
| Problema | Text | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.31 kb |
#include<fstream>
using namespace std;
main(){
ifstream f("text.in");
ofstream g("text.out");
char x;
unsigned int i=0,n=0;
while(f.get(x)){
if(('a'<=x&&x<='z')||('A'<=x&&x<='Z')){
n++;
while (('a'<=x&&x<='z')||('A'<=x&&x<='Z')){
i++;
f.get(x);
}
}
}
g<<i/n;
}
