Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<stdlib.h>
- #include<time.h>
- using namespace std;
- main()
- {
- srand( time( NULL ) );
- std::string t[10];
- t[0] = "a";
- t[1] = "b";
- t[2] = "c";
- t[3] = "d";
- t[4] = "e";
- t[5] = "f";
- t[6] = "g";
- t[7] = "h";
- t[8] = "i";
- t[9] = "j";
- int d=10;
- int e;
- do
- {
- e = rand() % d;
- cout << t[e] << endl << endl;
- for(int j=e; j<(d-1); j++)
- {
- t[j] = t[j+1];
- }
- d--;
- }while(d>0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement