Advertisement
v4m4v4

StupidPasswordGeneration

Nov 2nd, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. // StupidPasswordGenerator.cpp : Defines the entry point for the console application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include <iostream>
  6. #include <string>
  7. #include <algorithm>
  8. using namespace std;
  9.  
  10. int main()
  11. {
  12.     int n, l;
  13.     cin >> n >> l;
  14.  
  15.     for (int i = 1; i <= n; i++)
  16.     {
  17.         for (int k = 1; k <= n; k++)
  18.         {
  19.             for (char j = 'a'; j <= l ; j++)
  20.             {
  21.                 for (char g = 'a'; g <= l; g++)
  22.                 {
  23.                     for (int h = max(i, k) + 1; h <= n; h++)
  24.                     {
  25.                         cout << i << k << j << g << h << " ";
  26.                     }
  27.                 }
  28.             }
  29.         }
  30.     }
  31.     cout << endl;
  32.     return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement