Linux re-direction

Hello All,



Could somebody help with writing a program. I am trying to create a program which performs simple fraction arithmetic, EG: 3/5 + 1/5 = x

12/10 - 1/3 = x

-42/5 * 1/2 = x

7/4 / 0/5 = x

however the program is suppose to take input from another file. So there will be another file with all the input for the fractions in it then the program will use those inputs and create an output that looks like this:

3/5 + 1/5 = 20/25
12/10 - 1/3 = 26/30
-42/5 * 1/2 = -42/10
7/4 / 0/5 = could not be solved because division by zero is not defined.

11/2 + 6/4 = 56/8 = 7



Something like that. Please help.

It's generally not a good idea to ask an open question like this, without showing us what you have done so far. It's not easy for us to know exactly what you are asking for :) What have you written so far?
Topic archived. No new replies allowed.