Write a program that finds the two largest and two smallest integers in a file that’s filled with numerical values. The input should be read from a file numbers.dat, and the output should be displayed to the screen as well as written to a file named stats.dat.
The format of the input is as follows:
n1 n2 n3 n4 …
The format of the output is as follow:
The file contains ??? numbers
The two largest values in the list are: … …
The two smallest values in the list are: …
2007-03-25
05:46:22
·
1 answers
·
asked by
meme n
1
in
Computers & Internet
➔ Programming & Design