home *** CD-ROM | disk | FTP | other *** search
- // Lez22.cpp
-
- #include <algorithm>
- #include <iostream>
-
- using namespace std;
-
- int main()
- {
- char prev[] = "ciao"; //si provi a inserire una parola diversa qui...
- cout << "Le permutazioni precedenti " << prev << " sono:\n";
- while (prev_permutation(prev,prev+sizeof(prev)-1))
- cout << prev << "\t";
-
- char next[] = "ciao"; //... e qui
- cout << "\n\nLe permutazioni successive a " << next << " sono:\n";
- while (next_permutation(next,next+sizeof(next)-1))
- cout << next << "\t";
-
- cout << endl;
-
- return 0;
- }
-
-
-
-
-