Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cstdlib>
- #include<ctime>
- #include<algorithm>
- using namespace std;
- int const MAX=10;
- typedef int tArray[MAX];
- int random (int i) { return rand()%i;}
- int main()
- {
- srand(time(NULL));
- tArray miarray;
- for(int i=0; i<MAX; i++)
- {
- miarray[i]=i;
- }
- random_shuffle(miarray.begin(),miarray.end());
- random_shuffle(miarray.begin(),miarray.end(),random);
- cout << "La secuencia aleatoria es:";
- for()//mostrar los datos barajados
- {
- cout << endl;
- }
- }
Add Comment
Please, Sign In to add comment