Сделал 45 Задание
This commit is contained in:
parent
dae8abd5cc
commit
f677c28eb4
7 changed files with 99 additions and 0 deletions
23
45Ex/main.c
Normal file
23
45Ex/main.c
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue