Cod sursa(job #1513838)
| Utilizator | Data | 30 octombrie 2015 00:34:03 | |
|---|---|---|---|
| Problema | Text | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.5 kb |
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
int OK=0,length = 0,nr=0;
char character;
fstream f("text.in");
ofstream g("text.out");
while(!f.eof()){
f.get(character);
if((character>='a' && character<='z') || (character>='A' && character<='Z')){
OK = 1;
length++;
}
else if((OK==1)){
nr++;
OK = 0;
}
}
g<<length/nr;
return 0;
}
