I am trying to do simple conversion of a "long" fraction to it's Prime number
Joined: Oct 23, 2006
Sorry hit the wrong button ! Ok, so if a fraction is 1/2 then it's good , if the fraction is 3/2 , the method will convert it to 1-1/2. Here is my code:
my "else if" is causing me all the problems ( convert 3/2 to 1-1/2). Any suggestions what I am doing wrong ? I am getting incompatible types when I try to compile, but I though my toString was taking care of that ? Thank you for the insight !! Suggestions always welcome !! Thank you!
Try printing out a / b and a % b. That's all you need to do. You may end up with � coming out as 0 1/2, and ou will get peculiar results with negative numbers, but you can work out yourself how to deal with that!