Egyptian Fractions

When the ancient Egyptians wrote fractions they were only able to use ones of the form 1/a called unit fractions. An Egyptian wanting to write the fraction b/c, where b was not 1, had to write it as the sum of different unit fractions, For example, they would write 5/6 as 1/2 + 1/3 Write a program which converts a normal fraction into an Egyptian fraction. 


Taken from the 2008 Informatics Olympiad.  

Click here to view all the competition tasks. 

© British Informatics Olympiad

About CDB 362 Articles
Self-Employed Software Developer, Spark, Property Management, Hobby Forestry, Ex-Teacher, Engineering - Wood, Metal, Electrics & Computers. Outdoors - Walk, Cycle, Kitesurf,

Be the first to comment

Leave a Reply

Your email address will not be published.


This site uses Akismet to reduce spam. Learn how your comment data is processed.