#include
#include
#include
#include
using namespace std;
int main()
{
list l;
int i;
for(i=1; i<10; i++) l.push_back((double)i);
list::iterator p = l.begin();
while(p != l.end()) {
cout << *p << " ";
p++;
}
cout << endl;
p = transform(l.begin(), l.end(),l.begin(),negate());
cout << "Negated contents of the list:\n";
p = l.begin();
while(p != l.end()) {
cout << *p << " ";
p++;
}
return 0;
}