wget
and tar
to download
your starter code.
wget
to download the file at http://cs.longwood.edu/courses/cmsc160/f17/files/lab7.tgz
tar -xvzf lab7.tgz
ls
to see that there is a new directory called lab7
cd lab7
to change directory to the lab7 directory
./lab7 < test1.txt
would read input from the file test1.txt
instead of the keyboard!
Likewise, the command ./lab7 > result1.txt
would write all output to the file result1.txt
.
We will utilize file redirection to help with our test cases.
input: a vector of ints output: the smallest value in the input
input: a vector of ints output: the largest value in the input
input: a vector of ints output: the average of the ints in the vector (what is the return type?)
input: a vector of ints output: returns true (a boolean value) if the vector is in ascending or descending order
input: a vector of ints output: a vector containing all the integers in the input which are not negative
When you are done you may hand in your lab by using make handin
.
The lab is due at 11:59pm Oct. 10th 2017.