Rosetta Code
Greedy algorithm for Egyptian fractions
Decompose sample rational numbers into Egyptian fractions with the standard greedy method, including inputs whose unit-fraction denominators run to 25 digits.
Edit the source, then Run. Checks start after your first Run. Ctrl/⌘ + Enter runs; Tab indents. Preview services use sample data and never contact a real service.
rosettacode/popular/greedy_algorithm_for_egyptian_fractions.vibe
Output
Click Run example to see the result.
Code checks
Run once to load the checker. Your code stays in this browser.