Continued fraction: Difference between revisions
Content added Content deleted
(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: | Line 1: | ||
⚫ | |||
{{draft task}} |
|||
⚫ | |||
⚫ | |||
⚫ | |||
The task is to write a program which generates such a number and prints a real representation of it. |
The task is to write a program which generates such a number and prints a real representation of it. |
||
The code |
The code should 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. |
For the square root of 2 bN is always 1. a1 is 1 then aN is 2. |