The project should compile error- and warning-free on linprog with the command g
ID: 3620240 • Letter: T
Question
The project should compile error- and warning-free on linprog with the command g++ -ostats.x -Wall -Wextra stats.cpp.
The number of integers input by the user is not known in advance, except that it will not exceed 100. Numbers are input through standard input, either from keyboard or file re-direct. The program should read numbers until a non-digit or end-of-file is encountered or 100 numbers have been read.
Once the input numbers have been read, the program should calculate the mean and median and then report these values to standard output.
The source code should be structured and organized as follows:
The Sort() function should implement the Selection Sort algorithm.
When in doubt, your program should behave like the distributed executable examples in stats_i.x and stats_s.x in area51. Identical behavior is not required, but the general I/O behavior should be the same. In particular, the data input loop should not be interupted by prompts for a next datum - this will make file redirect cumbersome. Just ask for the data one time, then read until a non-digit or end of file is encountered.
Explanation / Answer
please rate - thanks if you haven't learned functions message me and I'll get rid of themRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.