Pagini recente » Cod sursa (job #2901956) | Cod sursa (job #1344403) | Cod sursa (job #1101246) | Cod sursa (job #1909534) | Cod sursa (job #1131543)
#include<cstdio>
#define InFile "text.in"
#define OutFile "text.out"
using namespace std;
unsigned int lit,cuv;
char k;
bool ok;
int main()
{
FILE *f=fopen(InFile,"r");
FILE *g=fopen(OutFile ,"w");
while(k!='\n')
{
fscanf(f,"%c",&k);
while(k>='a'&&k<='z'||k>='A'&&k<='Z')
{
lit++;ok=true;
fscanf(f,"%c",&k);
}
if(ok)cuv++,ok=false;
}
fprintf(g,"%d",lit/cuv);
return 0;
}