Сделал 45 Задание

This commit is contained in:
AZEN-SGG 2024-09-22 22:05:28 +03:00
parent dae8abd5cc
commit f677c28eb4
7 changed files with 99 additions and 0 deletions

23
45Ex/main.c Normal file
View file

@ -0,0 +1,23 @@
#include <stdio.h>
#include "tools.h"
#include "solve_polynomial.h"
/*
Problem 45
Coordinate X: 2
Solution: 129
Derivative: 222
*/
int main(void) {
double derivative, polynomial, x;
FILE * file = getFile();
if (file == NULL) return 1;
printf("Enter x coordinat: ");
scanf("%lf", &x);
if (solvePolynomial(file, x, &derivative, &polynomial)) return 1;
printf("Solve of the polynomial is %lf\nSolve of its derivative is %lf\n", polynomial, derivative);
return 0;
}