Question
Java problem In this problem, the first input is a positive integer called n that will represent the number of lines to process. The lines
Java problem
In this problem, the first input is a positive integer called n that will represent the number of lines to process. The lines to be processed have one or more integers separated by whitespaces. 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
It is worth to mention that the number of integers of each line is not known a priori and can varry from line to line. Write a program that solve this requirement.
Input Format
The first line contains n, the number of lines to be processed. The remaining n lines are the lines to be processed.
Constraints
n must be a positive integer. The lines to be processed must have at least one integer.
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
4 -9 17 77 -18 55 0 42 11 7 90 -2 -15 30 -8 0 2 8 12 22 -1 5
Sample Output 0
-18 77 67 -15 90 218 -8 2 -6 -1 22 46
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started