t_sh0w

06. Password Generator

Dec 15th, 2019
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.07 KB | None | 0 0
  1. using System;
  2.  
  3. namespace PasswordGenerator
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int n = int.Parse(Console.ReadLine());
  10.             int l = int.Parse(Console.ReadLine());
  11.  
  12.             for (int symbol1 = 1; symbol1 <= n; symbol1++)
  13.             {
  14.                 for (int symbol2 = 1; symbol2 <= n; symbol2++)
  15.                 {
  16.                     for (char symbol3 = 'a'; symbol3 < (l + 'a'); symbol3++)
  17.                     {
  18.                         for (char symbol4 = 'a'; symbol4 < (l + 'a'); symbol4++)
  19.                         {
  20.                             for (int symbol5 = 1; symbol5 <= n; symbol5++)
  21.                             {
  22.                                 if (symbol5 > symbol2 && symbol5 > symbol1)
  23.                                 {
  24.                                     Console.Write($"{symbol1}{symbol2}{symbol3}{symbol4}{symbol5} ");
  25.                                 }
  26.                             }
  27.                         }
  28.                     }
  29.                 }
  30.             }
  31.         }
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment