Advertisement
Spocoman

14. Password Generator

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