Question: Java In this problem, the first input line has two positive integers called n and m that will represent the number of lines to process,

Java

In this problem, the first input line has two positive integers called n and m that will represent the number of lines to process, and the number of integers in each line to be processed, respectively. The integers in the lines to be processed are space-separated. For each of these lines, you must output:

The minimum value of the integers

The maximum value of the integers

The sum of the integers

Write a program that solve this requirement.

Input Format

The first line contains n (the number of lines to be processed) and m (the number of integers in each line to be processed). The remaining n lines are the lines to be processed and have m integers.

Constraints

n and m must be positive integers.

Output Format

For each line to be processed, the output must be formed by 3 space-separated integers: min max sum min: the minimum value of the integers of the line. max: the maximum value of the integers of the line. sum: the sum of the integers of the line.

Sample Input 0

2 4 -90 10 55 7 6 -20 11 -9 

Sample Output 0

-90 55 -18 -20 11 -12 

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!