Pagini recente » Cod sursa (job #1280199) | Cod sursa (job #2225226) | Cod sursa (job #2210448) | Cod sursa (job #1595852) | Cod sursa (job #1513838)
#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;
}