Fraction
Time Limit: 1 sec
The Problem
A fraction ("broken") represents a part of a whole or, more generally, any number of equal parts. When spoken in everyday English, a fraction describes how many parts of a certain size there are, for example, one-half, eight-fifths, three-quarters.
Example, 1/3, 1/8, 3/8, etc.
Write a program that reads 2 fraction numbers x and y, formated like that x1/x2 and y1/y2.
Here
x1 = the numerator of x;
x2 = the denominator of x;
y1 = the numerator of y; and
y2 = the denominator of y;
and displays a message indicating how x and y compare (i.e., whether x < y, x = y, or x > y).
The Input
The input file contains 2 fraction numbers x and y in each line. You may assume that all inputs are positive and less than 1000. Input is terminated by EOF.
The Output
Output will show the copare message "x > y" if x is greater than y or "x = y" if x and y are equal or "x < y" if x is less than y.
Sample Input
1/2 1/3
2/3 4/5
1/3 7/21
Sample Output
x > y
x < y
x = y
Problem Setter: Shahin ShamS