Сделал 1 Задание со списками
This commit is contained in:
parent
5dbf4901b8
commit
632a718df1
71 changed files with 106 additions and 0 deletions
22
ProcessingSequences/46Ex/main.c
Normal file
22
ProcessingSequences/46Ex/main.c
Normal file
|
@ -0,0 +1,22 @@
|
|||
#include <stdio.h>
|
||||
#include "tools.h"
|
||||
#include "solution_polynomial.h"
|
||||
|
||||
/*
|
||||
Example: 5 4 3 2 1
|
||||
x: 2
|
||||
|
||||
Answer: 80 + 32 + 12 + 4 + 1 = 129
|
||||
160 + 48 + 12 + 2 = 222
|
||||
*/
|
||||
|
||||
int main(void) {
|
||||
double x, derivative, polynomial;
|
||||
FILE * file = getFile();
|
||||
if (file == NULL) return 1;
|
||||
|
||||
printf("Enter the x cordinate: ");
|
||||
scanf("%lf", &x);
|
||||
if (solutionPolynomial(file, x, &derivative, &polynomial)) return 1;
|
||||
printf("The solution of the polynomial is %.0lf\nThe solution of the derivative is %.0lf", polynomial, derivative);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue