posted 10 years ago
Hi Everyone,
I have an example program given by my teacher that is meant to help with our abstract fraction program. I mostly understand what it's supposed to do, but it doesn't compile because there's a couple of issues with it (why he would bother giving and uncompilable program is beyond me, but hey, at least he gave me something for once). I'm going to post it and then point out the issues, and if anyone could tell me how to fix them so I can use it to compare to my own assignment, that would be great.
The parts of the code I highlighted in red are the problems. The "Savitch.In" is an issue, and the "common = convert(common)" is also. This is the output I'm getting for that program.
1/3 - 1/6 = 0/1
1/6 - 1/3 = 0/1
Fraction 1:
Please enter an integer for numerator: Please enter a non-zero integer for denominator:
Fraction 2:
Please enter an integer for numerator: Please enter a non-zero integer for denominator:
1/3 * 1/6 = 1/18
1/3 / 1/6 = 2/1
BUILD SUCCESSFUL (total time: 1 second)
Thanks.