Question: In C programming ( as a beginner ) , write an algorithm in the main ( ) that generates N first elements of a series

In C programming(as a beginner), write an algorithm in the main() that generates N first
elements of a series sn(x)=-(x)nn.
This series represents the Taylor series : ln(1-x)~~-n=1N=6(x)nn.
Evaluate this series in for() loop for x=0.5, and n=1,2,dots,6. Calculate and print the subsequent
element values in a terminal. Hint: the first three elements are -x,-x2n,-x3n.
Modify the main () such that the user can insert through a keyboard value of m. Allocate
dynamically two 1-dimensional arrays (VecA and VecB) that contain m=10 elements of
double type.
Write a separate function funFill() that will fill a dynamically allocated vector VecA from
point 2 with the first 10 elements of a series defined in point 1(n=1,2,3,dots,10). Print in the
terminal values of each element in VecA
Write a separate function funLn() that will fill a dynamically allocated vector VecB from point
2 with the sum of the first m elements of a series defined in point 1(i.e. for n=1 sum of the
first element, for n=2 sum of first two elements, for n=3 the sum of first three elements,etc.)
Print in the terminal values of each element in VecB; n must be implemented as an input
argument.
Modify the funLn() such that the last element of VecB is also returned into the main () using
a pointer.
Plot the value of the last element of VecB for x=0.5 in for() loop for n=1,dots20. Plot the
absolute value of the difference between the value of the last element of VecB and function
ln(1-x). Save this data in a separate txt file in three columns: n- first column, last element of
VecB - second column, the absolute value of the difference between last element of VecB
and ln(1-x)- third column.
 In C programming(as a beginner), write an algorithm in the main()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!