0

In interview i faced the problem with this program finally i lost that oportunity,i am trying for that code to solve almost for a month ,i can't get get that one, plz help me i can't solve the program upto now.

the program was...........

he gave me a big String like "12345695123547895236412578963214563214578952144531214553362511455224555", without converting this string into BIGINTEGER format, divide that string with a integer value......

input String is

String longString="12345695123547895236412578963214563214578952144531214553362511455224555";
int divisor=5;

2
Contributors
2
Replies
9
Views
4 Years
Discussion Span
Last Post by stultuske
0

plz give me solution i am waiting for that one....
even an idea on resolving it...

0

you can write an algo rithm like the kids do at first/second grade:

13/5?
=+>

1/5 = 0 (keep the one)
add next digit:
13/5 = 2 (loose the 10 => 2*5)
no next number, so:
13/5 = 2 with rest 3.

as in we're going to write the code for you ... show us the code you've written, explain what it is you're trying to do and what is not working, and we will gladly help you correct your errors, but we will not write custom made code for you.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.