Cod sursa(job #1487713)
Utilizator | Data | 17 septembrie 2015 12:37:39 | |
---|---|---|---|
Problema | Text | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.44 kb |
#include <fstream>
using namespace std;
ifstream f("text.in");
ofstream g("text.out");
int n,nrc,nr,nrcuv;
char c;
int main()
{ while(!f.eof())
{ f.get(c);
if((c>=65 and c<=90) or (c>=97 and c<=122))
{ nr=0;
while((c>=65 and c<=90) or (c>=97 and c<=122))
{ f.get(c);
nr++;
}
nrc+=nr;nrcuv++;
}
}
g<<nrc/nrcuv;
return 0;
}