#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(void)
{
const int VECTOR_SIZE = 8 ;
typedef vector<int> IntVector ;
typedef IntVector::iterator IntVectorIt ;
IntVector Numbers(VECTOR_SIZE) ;
IntVectorIt start, end, it ;
Numbers[0] = 4 ;
Numbers[1] = 10;
Numbers[2] = 70 ;
Numbers[3] = 30 ;
Numbers[4] = 10;
Numbers[5] = 69 ;
Numbers[6] = 96 ;
Numbers[7] = 100;
start = Numbers.begin() ;
end = Numbers.end() ;
for(it = start; it != end; it++)
cout << *it << " " ;
random_shuffle(start, end) ;
for(it = start; it != end; it++)
cout << *it << " " ;
}
|