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

 

divide


Define a function that when passed two Strings, each holding a (possibly very very long integer) as a String, returns the first number divided by the second number (ignore the remainder), 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.


divide("14769399226177910006513559769544792385926694104313180", "4835630683058204684") → "3054286026830584624586035630863645"
divide("3458010375626989", "1729") → "2000006000941"
divide("3458010375626990", "1729") → "2000006000941"

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

String divide(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