id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

jebbert@volusia.k12.fl.us > coolDivision
prev  |  next  |  chance

Write a method that accepts two integer parameters, numerator and denominator, then returns a string that represents the result of performing that division problem. The results will be in the form "a+(b/c)" where a, b, and c are integers unless b is zero, then the results will be in the form "a". Note that both input parameters will be positive.


coolDivision(8748, 42) → "208+(12/42)"
coolDivision(257, 256) → "1+(1/256)"
coolDivision(1, 1) → "1"

...Save, Compile, Run (ctrl-enter)

public String coolDivision(int numerator, int denominator) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 422

Copyright Nick Parlante 2017 - privacy