Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include "generateurmdp.h"
- #include <cstdlib>
- using namespace std;
- string generateurmdp(int typeOfGeneration, int nbOfGeneration)
- {
- int n = 0;
- string mdp;
- string var;
- int random;
- if (type == 3)
- {
- while (n < nb)
- {
- do
- {
- random = rand();
- }while (random < 0 || random > 10);
- mdp+=itoa(random, var, 10);
- n++;
- }
- }
- return mdp;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement