Lab 5 - STL Algorithms

Due: Wednesday at 5:00pm
This lab is worth 10 points.

This lab will use the STL algorithms on the vector class in order to learn how to use the STL algorithms. You will need the following headers in your lab5.cpp file:

#include <vector>
#include <algorithm>
using namespace std;
This will give you access to the algorithms and the vector class. The vector class contains the standard iterator functions begin() and end(). For example, the following code snippet from page 565 of the book will sort a vector:
int ints[] = {555, 33, 444, 22, 222, 777, 1, 66};
vector<int> v(ints, ints + 5);      // Use only the first 5 elements of ints
sort(v.begin(), v.end());
Create a main program that does the following sequentially (no menus needed): Email me your completed program.