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

 

remainder


Define a function that when passed two Strings, each holding a (possibly very very long integer) as a String, returns the remainder when the first number is divided by the second number, as a String.

You may assume that both numbers are positive (more than zero).

NOTE: The strings can be very very very very long so don't even try to convert them to integers.


remainder("10", "20") → "10"
remainder("3458010375626989", "1729") → "0"
remainder("10000000000000000000", "200002000020") → "10000"

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

String remainder(String a, String b) { }

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: 7

Copyright Nick Parlante 2017 - privacy