about | help | code help+videos | done | prefs |
Given two integers, a and b, representing the numerator and denominator of a fraction, respectively, return an array of three integers representing the integer part, and the fraction in its reduced form. If the fraction value is zero, it is represented as 0/1. reduceFraction(3, 9) → [0, 1, 3] reduceFraction(4, 3) → [1, 1, 3] reduceFraction(12, 18) → [0, 2, 3] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy