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;

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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.