#include #include int numGt(FILE* f); int main() { FILE* in = fopen("input.txt", "r"); if (in == NULL) { perror("Could not open input file"); return (-1); } int n = numGt(in); fclose(in); FILE* out = fopen("output.txt", "w"); if (in == NULL) { perror("Could not open output file"); return (-1); } fprintf(out, "%d\n", n); fclose(out); return 0; } int numGt(FILE* f) { int n = 0; double prev = 1e+30; double a; while (fscanf(f, "%lf", &a) == 1) { if (a > prev) ++n; prev = a; } return n; }