Advertisement
JOHNYTHEWINNER

Simple password generator

Feb 18th, 2020
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.85 KB | None | 0 0
  1. # include <iostream>
  2. using namespace std;
  3. #include <iomanip>
  4. #include <math.h>
  5. #include <cmath>
  6. #include <string>
  7.  
  8. int main()
  9. {
  10.     int n;
  11.     int l;
  12.     cin >> n;
  13.     cin >> l;
  14.     int counter1;
  15.     int counter2;
  16.     int counter3;
  17.     int counter4;
  18.     int counter5 = 1;
  19.     for (counter1 = 1; counter1 < n; counter1++) {
  20.         for (counter2 = 1; counter2 < n; counter2++) {
  21.             for (counter3 = 97; counter3 < l + 97; counter3++) {
  22.                 char letter1 = int(counter3);
  23.                 for (counter4 = 97; counter4 < l + 97; counter4++) {
  24.                     char letter2 = int(counter4);
  25.                     for (counter5 = 1; counter5 <= n; counter5++) {
  26.                         while (counter5 <= n)
  27.                         {
  28.                             if (counter5 > counter1&& counter5 > counter2) {
  29.                                 cout << counter1 << counter2 << letter1 << letter2 << counter5 << " ";
  30.                             }
  31.                             counter5++;
  32.                         }
  33.                     }
  34.                 }
  35.  
  36.             }
  37.         }
  38.     }
  39.  
  40.  
  41.     return 0;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement