Question: Write a complete Java program to do the following Read from a file input5.txt a list of pairs of integers. For each pair, if the

Write a complete Java program to do the following Read from a file input5.txt a list of pairs of integers. For each pair, if the sum of the two numbers is positive, calculate as a decimal number the first divided by the second. If the sum is negative, calculate as a decimal number the second divided by the first. You may assume neither value is zero. a. b. Write the two numbers and the calculated quotient to a file output5.txt, one pair per line. Do this until there is no more data to read At the end, print 2 things with an appropriate message: The number of pairs processed, and the value of the quotient closest to zero. Remember that the quotient may be positive or negative c
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
