Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <ctime>
- #include <cstdlib>
- using namespace std;
- string melangerLettres(string mot)
- {
- string khalit;
- int makane(0);
- int b;
- b=0;
- while (mot.size() != 0)
- {
- makane = rand() % mot.size();
- khalit += mot[makane];
- mot.erase(makane, 1);
- b++;
- if(b==11)goto a;
- }
- a:
- return khalit;
- }
- int main()
- {
- string nomeKey, motkey;
- srand(time(0));
- nomeKey="abcdefghijklmnopqrstvwxyzABCDEFGHIJKLMNOPQRSTVWXYZ12345789";
- motkey = melangerLettres(nomeKey);
- cout << endl << "hada hwa ramzok seri: " << motkey << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement