Question: Sample: output: make sure the program run properly. This assignment involves computing continued fractions, and contains three parts. The general form of a continued fraction

Sample:
output:
make sure the program run properly.
This assignment involves computing continued fractions, and contains three parts. The general form of a continued fraction is: A finite continued fraction is an expression of the form 02 , an where ao is an integer, all other a are positive integers, and n is a non-negative integer. We can specify a continued fraction by an array of integers containing the values ao an. 1. Write a function that takes an array of integers as specified above (and ending with a -1) and returns the value of the fraction as a double. 2. Write a function that takes an array of integers as specified above (and ending with a -1). Your function will represent the value of the continued fraction as a "regular" fraction, p/q, in lowest terms. We are looking for the result of doing the fractional arithmetic and keeping everything in integers as we work our way through. The function returns a 2-element integer array, v, with v[0]=p and v 1-q. 3. Write recursive functions that, given the above representation of a continued fraction, returns p and q such that p/q represent the value of the continued fraction as a "regular" fraction in lowest terms, as in question 2 above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
