Question: Java Minimum, Maximum, and Sum for Homogeneous Lines the first input line has two positive integers called n and m that will represent the number
Java
Minimum, Maximum, and Sum for Homogeneous Lines
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
Get step-by-step solutions from verified subject matter experts
