Problem

Filtering. Which of the following require saving all the values from standard input (in an...

Filtering. Which of the following require saving all the values from standard input (in an array, say), and which could be implemented as a filter using only a fixed number of variables and arrays of fixed size (not dependent on N)? For each, the input comes from standard input and consists of N real numbers between 0 and 1.

■ Print the maximum and minimum numbers.

■ Print the median of the numbers.

■ Print the k th smallest value, for k less than 100.

■ Print the sum of the squares of the numbers.

■ Print the average of the N numbers.

■ Print the percentage of numbers greater than the average.

■ Print the N numbers in increasing order.

■ Print the N numbers in random order.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 1.1