From 1200baf94269450913e11df6b67ed2c164e72dac Mon Sep 17 00:00:00 2001 From: Pavlo Tverdyi Date: Sat, 14 Mar 2020 22:34:37 +0000 Subject: [PATCH] =?UTF-8?q?P=C5=99idat=20=E2=80=9Ea1=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- a1 | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 a1 diff --git a/a1 b/a1 new file mode 100644 index 0000000..34434f6 --- /dev/null +++ b/a1 @@ -0,0 +1,26 @@ +#include +#include +#include +int main() +{ + int i,c; + double x; + double result=0; + scanf("%lF",&x); + double *array; + array = (double*) malloc(1000); + for(i=0,c=1;i0; i--,j++){ + printf("%.2F ",array[j]); + result+=array[i-1]*pow((double)x,j); + } + + printf("%.2F",result); + free(array); + return 0; +}