Advertisement
mitakvd

09. Password Generator

Jul 17th, 2019
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.59 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <cmath>
  4.  
  5. using namespace std;
  6.  
  7. int main () {
  8.  
  9.     int n, l;
  10.     cin >> n >> l;
  11.  
  12.     for(int a = 1; a < n; a++) {
  13.         for(int b = 1; b < n; b++) {
  14.             for(char c = 'a'; c < 'a' + l; c++) {
  15.                 for(char d = 'a'; d < 'a' + l; d++) {
  16.                     for(int e = 1; e <= n; e++) {
  17.                         if(e > a && e > b) {
  18.                             cout << a << b << c << d << e << " ";
  19.                         }
  20.                     }
  21.                 }
  22.             }
  23.         }
  24.     }
  25.  
  26.  
  27.     return 0;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement