Сделал 1 Задание со списками

This commit is contained in:
AZEN-SGG 2024-10-04 10:43:43 +03:00
parent 5dbf4901b8
commit 632a718df1
71 changed files with 106 additions and 0 deletions

View file

@ -0,0 +1,21 @@
#include "make_increasing.h"
int makeIncreasing(FILE * file) {
double current, next;
unsigned short used = 0;
if (fscanf(file, "%lf", &current) != 1) {
printf("File is empty!");
return 0;
}
while (fscanf(file, "%lf", &next) == 1) {
if ((next - current) < DISREG) {
if (used == TRUE) return 0;
used = TRUE;
}
current = next;
}
return 1;
}