Question: The input will be a text file, for example inSample.txt below will be provided. The first line will contain an integer N, which is the

The input will be a text file, for example inSample.txt below will be provided. The first line will contain an integer N, which is the number of lines to follow. Each of the N lines contains two integers X and Y, separated by a space.

You may write your program in either Python, C, or C++.

The input will be a text file, for example inSample.txt below will be provided. The first line will contain an integer N, which is the number of lines to follow. Each of the N lines contains two integers X and Y , separated by a space.

5 -

1 3

8 9 1

43 -256

0 0

-9 -10

For each of the pairs X Y output X + Y and X Y on a line, separated by a single space. For example, on the sample input above you should have

2 -3

17 72

-113 -36608

0 0

-19 90

We will test your program by running your program at the command line. You will need to use STANDARD INPUT. Do not pass in the name of the file as an argument - do not encode the name of your input file in your program. We will run your program on several different test files.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!