Question: Programming WWW problem 1. Construct this series and output the result only: 1/2 + 2/3 + 3/4 + 4/5 + ... + 99/100. 2. Convert

Programming WWW problem

1. Construct this series and output the result only: 1/2 + 2/3 + 3/4 + 4/5 + ... + 99/100.

2. Convert the following iterative function into a recursive function and print the result:

int f(int N)

{

int count, sum=0;

for(count = 0; count<=N; count++)

sum = sum + count;

return sum;

}

Note: User should be able to input the value of N. (e.g: for "N==4" the output should be "10". It is a cumulative summation problem)

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!