Сделал 15ю Задачу
This commit is contained in:
parent
4c36e1638a
commit
4e498f2819
8 changed files with 133 additions and 54 deletions
|
|
@ -4,12 +4,20 @@
|
|||
|
||||
int main(void) {
|
||||
double * numbers;
|
||||
unsigned length;
|
||||
FILE * file = getFile();
|
||||
if (file == NULL) return -1;
|
||||
|
||||
numbers = getList(file);
|
||||
if (numbers == NULL) return 1;
|
||||
|
||||
printf("Count elements in file: %d", findAndReplaceLocalMin(numbers));
|
||||
length = find_replace_local_min(&numbers[1], (int)numbers[0] - 1);
|
||||
|
||||
for (int i = 1; i < (int)length + 1; ++i) {
|
||||
printf("%.1lf ", numbers[i]);
|
||||
}
|
||||
|
||||
free(numbers);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue