-(void) reduce
{
int u = numerator;
int v = denominator;
int temp;
while (temp !=0) {
temp = u % v;
u = v;
v = temp;
}
numerator /=u;
denominator /=v;
}
-(void) reduce { int u = numerator; int v = denominator; int temp; while
Share
You are dividing by zero. I think the last line should be,