about | help | code help+videos | done | prefs |
Given a String representing a fraction in the form "numerator/denominator", extract the numerator and denominator and return the result of double division of the numerator by the denominator. HINT: use Integer.parseInt() or Double.parseDouble() to collect a String into a primitive value. Use indexOf and substring to figure out where the start and end of the input happens.apcsaPrimitivesDivideFractionString("3/4") → 0.75 apcsaPrimitivesDivideFractionString("1/2") → 0.5 apcsaPrimitivesDivideFractionString("-1/4") → -0.25 ...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: 150
Copyright Nick Parlante 2017 - privacy