Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions