Jump to content

Continued fraction: Difference between revisions

m
Shrink the image a bit, fix a typo
(Created page with "{{draft task}} A number may be represented as a continued fraction (see http://mathworld.wolfram.com/ContinuedFraction.html) as follows: [[File:Continued_Fraction.PNG|cente...")
 
m (Shrink the image a bit, fix a typo)
Line 1:
{{draft task}}A number may be represented as a continued fraction (see http://mathworld.wolfram.com/ContinuedFraction.html) as follows:
{{draft task}}
 
[[FileImage:Continued_Fraction.PNG|center|Continued Fraction|200px]]
A number may be represented as a continued fraction (see http://mathworld.wolfram.com/ContinuedFraction.html) as follows:
 
[[File:Continued_Fraction.PNG|center|Continued Fraction]]
 
The task is to write a program which generates such a number and prints a real representation of it.
 
The code sholudshould be tested by calculating and printing the square root of 2, Napier's Constant, and Pi.
 
For the square root of 2 bN is always 1. a1 is 1 then aN is 2.
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.