#include #include #include #include #include #include using namespace std; int main() { const int n=10; array< int , n > x = {10,1,2,9,3,8,4,7,5,6}; cout << " Original sequence " << endl; for( auto i : x ) cout << i << " " ; cout << endl; shuffle( x.begin() , x.end() ,default_random_engine()); cout << " After shuffle " << endl; for( auto i : x ) cout << i << " " ; cout << endl; int t; t = *(min_element( x.begin() , x.end() )); cout << " Smallest is " << t << endl; t = *(max_element( x.begin() , x.end() )); cout << " Largest is " << t << endl; t = accumulate( x.begin() , x.end() ,0 ); cout << " Sum is " << t << endl; sort ( x.begin() , x.end() ); cout << " After sort " << endl; for( auto i : x ) cout << i << " " ; cout << endl; return(0); }