Pagini recente » Cod sursa (job #1951269) | Cod sursa (job #1883503) | Cod sursa (job #2483845) | Cod sursa (job #1171519) | Cod sursa (job #1513835)
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
int x,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;
}
}
length = length/nr;
g<<length;
return 0;
}