I need to write a program that can calculate fractions.

All set
Last edited on
Last edited on
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
Topic archived. No new replies allowed.