#include <list>
using namespace std;
int main()
{
list<int> numbers(5, 0); // (size, item) --> has five 0's
list<int>::iterator it;
for(it = numbers.begin(); it != numbers.end(); it++)
{
cout << "Enter a number: ";
cin >> *it;
}
cout << "The front value is " << numbers.front() << endl;
cout << "The back value is " << numbers.back() << endl;
for (it = numbers.begin(); it != numbers.end(); it++)
{
cout << *it << "\t" << endl;
}
cout << "There are " << numbers.size() << " on the list" << endl;
numbers.pop_front();
numbers.pop_back();
cout << "After the pop_front and pop_back functions, there are " <<
numbers.size() << " on the list" << endl;
}