# Large String division by integer, without converting that string into BigInteger Format, How can?

• May 30th, 2013, 04:38 AM
shiva17
Large String division by integer, without converting that string into BigInteger Format, How can?
big String like "1234569512354789523641257896321456321457895214453 1214553362511455224555", without converting this string into BIGINTEGER format, divide this string with a integer value......

input String like this

String longString="12345695123547895236412578963214563214 578952144531214553362511455224555";
int divisor=5;
• May 30th, 2013, 06:23 AM
angstrem
Re: Large String division by integer, without converting that string into BigInteger Format, How can?
What have you tried?
• May 30th, 2013, 09:24 AM
shiva17
Re: Large String division by integer, without converting that string into BigInteger Format, How can?
i dont have any idea to solving this,

How do i go for next, i mean
we divide integers,float,long,double,biginteger values by these......

but how i divide a string( Large String contains numeric digits) by integer, without converting it into biginteger
• May 30th, 2013, 09:55 AM
angstrem
Re: Large String division by integer, without converting that string into BigInteger Format, How can?
I can give 2 hints:
1) Consider Integer.parseInt(). You can't use it for a whole string, but you can use it for a tiny part of string
2) Try a simple division by yourself on a sheet of paper. Say, 3354/43. Try identifying recursive patterns in the process. Recursion is a key to this problem.
• May 30th, 2013, 10:34 PM
shiva17
Re: Large String division by integer, without converting that string into BigInteger Format, How can?
Quote:

Originally Posted by angstrem
I can give 2 hints:
1) Consider Integer.parseInt(). You can't use it for a whole string, but you can use it for a tiny part of string
2) Try a simple division by yourself on a sheet of paper. Say, 3354/43. Try identifying recursive patterns in the process. Recursion is a key to this problem.

ok but he mentioned without converting it into integer datatypes

--- Update ---

thank you angstrem for replying my post
• May 30th, 2013, 11:27 PM
jps
Re: Large String division by integer, without converting that string into BigInteger Format, How can?
Quote:

Originally Posted by shiva17
without converting this string into BIGINTEGER format, divide this string with a integer value

Quote:

Originally Posted by shiva17
ok but he mentioned without converting it into integer datatypes

BigInteger Integer and int are three different things.
Not much can be said without a clear description of the rules
If all else fails paste the instructions to your assignment with your question
• June 3rd, 2013, 04:57 AM
shiva17
Re: Large String division by integer, without converting that string into BigInteger Format, How can?
Quote:

Originally Posted by shiva17
ok but he mentioned without converting it into integer datatypes

--- Update ---

thank you angstrem for replying my post

hi, angstrem

Thanks for ur sujjestion, finally iam getting that one with the help of ur Idea, once again thanks angstrem....