
{filelink=14667}
#include
#include
#include
using namespace std;
void afficher (char elem)
{
cout << elem << ' ';
}
int main()
{
list listAlphbet;
// Insrérer des éléments dans la liste
for (int i=1; i<=26; ++i)
{
listAlphbet.push_back(i+'a');
}
// Afficher les élément de la liste dans l'ordre initial
for_each (listAlphbet.begin(), listAlphbet.end(),
afficher);
cout << endl;
// Afficher les élément de la liste dans l'ordre inverse
for_each (listAlphbet.rbegin(), listAlphbet.rend(),
afficher);
cout << endl;
return 0;
}
/*
b c d e f g h i j k l m n o p q r s t u v w x y z
z y x w v u t s r q p o n m l k j i h g f e d c b
*/