Oct 24, 2013 at 10:57pm
I need to write a program that can calculate fractions.
All set
Last edited on Oct 25, 2013 at 3:41am
Oct 24, 2013 at 11:44pm
Thanks
Last edited on Oct 25, 2013 at 3:24am
Oct 25, 2013 at 12:20am
You don't need to return them. Problem is (I think), that you never use reduce(); just den1. Also, line 70 sets both b and temp to divisor=1.
edit: Sorry. reduce() wasn't the problem there, but your math's off. Your example's denominator (4) is den1, though den2, in most cases will differ.
Last edited on Oct 25, 2013 at 12:54am