diff --git a/a1/program.c b/a1/program.c index 56a6051..d2da0bd 100644 --- a/a1/program.c +++ b/a1/program.c @@ -1 +1,32 @@ -1 \ No newline at end of file +#include +#include +#include + +int main() +{ + int i,c; + double x; + long double result=0; + scanf("%lF",&x); + long double *array; + array = (long double*) malloc(10000); + for(i=0,c=1;i0; i--,j++){ + result+=(long double)(array[j]*pow(x,i-1)); + } +// if(result>=10000&&result<1000000000000){ +// result=((int)(result*100-0.5)/100); +// } + printf("%.2Lf",result); + free(array); + return 0; +} + + + +