CMIS 102A
Make a fraction calculator.
The user enters 4 numbers representing the first numerator,
first denominator, second numerator, second denominator, respectively,
of the two fractions. For illustration purposes they will be called
a, b, c, d.
The program outputs the results of the five arithmetic operations on
the two fractions:
a/b + c/d
a/b - c/d
a/b * c/d
a/b / c/d
a/b % c/d
Divide a by b and c by d and use those two values in the five
arithmetic operations (i.e. don't even think about lowest common
denominators etc). The result will be a single number.
Use a copy of Calculator4Applet as a base to create this program, as
it is similar to that applet.
When that is done, continue here:
Okay, now give an error message and quit if either denominator is
zero.
[This must be one if statement (i.e. use the logical or
operator). if we've covered the logical operators ]
When that is done, continue here:
Ask which one of the five operations the user wants to do and do that
one only. Gee, this sounds a lot like CalculatorIfApplet, so copy
that code into your program and modify it.