Pagini recente » Cod sursa (job #3166473) | Istoria paginii runda/jjkkjh/clasament | Cod sursa (job #2566696) | Istoria paginii runda/concurstreiore/clasament | Cod sursa (job #1394135)
#include <stdlib.h>
#include <stdio.h>
int main()
{
FILE* input;
input = fopen("text.in","r");
int count = 0;
int total = 0;
while( feof(input) == false )
{
int c = fgetc(input);
if ( c == (int)(' ') )
{
count++;
}
if ( ( 64 < c && c < 91 ) || ( 96 < c && c < 123 ) )
{
++total;
}
}
FILE* output;
output = fopen("text.out","w");
fprintf(output,"%d",total/(count+1));
fclose(input);
return 0;
}