Time Limit: 2000/1000 MS (Java/Others)
Memory Limit: 65536/32768 K (Java/Others)
The input for your program will be a series of words, two per line, until the end-of-file flag of -1. Using the above technique, you are to calculate appx() for the pair of words on the line and print the result. For example: CAR CART TURKEY CHICKEN MONEY POVERTY ROUGH PESKY A A -1 The words will all be uppercase.
Print the value for appx() for each pair as a reduced fraction, like this: appx(CAR,CART) = 6/7 appx(TURKEY,CHICKEN) = 4/13 appx(MONEY,POVERTY) = 1/3 appx(ROUGH,PESKY) = 0 appx(A,A) = 1