about | help | code help+videos | done | prefs |
Write a method that returns a string representing the fraction with a numerator of 'numerator' and a denominator of 'denominator', except if 'denominator' is zero then you return "Not a number (NaN)" because you cannot divide by zero so a fraction with a zero in the denominator doesn't make sense! test2021_11_18_APSLHL_fract(51, 11) → "51/11" test2021_11_18_APSLHL_fract(5, 3) → "5/3" test2021_11_18_APSLHL_fract(6, 2) → "6/2" ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 220
Copyright Nick Parlante 2017 - privacy