Menu

Input Text File Example Insampletxt Provided First Line Contain Integer N Number Lines Fol Q43805296

The input will be a text file, for example inSample.txt belowwill be provided. The first line will contain an integer N, whichis the number of lines to follow. Each of the N lines contains twointegers 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 belowwill be provided. The first line will contain an integer N, whichis the number of lines to follow. Each of the N lines contains twointegers 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 aboveyou should have

2 -3

17 72

-113 -36608

0 0

-19 90

We will test your program by running your program at the commandline. You will need to use STANDARD INPUT. Do not pass in the nameof the file as an argument – do not encode the name of your inputfile in your program. We will run your program on several differenttest files.

Expert Answer


Answer to The input will be a text file, for example inSample.txt below will be provided. The first line will contain an integer N…

OR