anizko

09. Password Generator

Apr 20th, 2019
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.15 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _09._Password_Generator
  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.             int x = 96 + l;
  13.  
  14.                 for(int x1=1; x1<n; x1++)
  15.                 {
  16.                     for (int x2 = 1; x2 < n; x2++)
  17.                     {
  18.                         for (int x3 = 97; x3 <= x; x3++)
  19.                         {
  20.                             for (int x4 = 97; x4 <= x; x4++)
  21.                             {
  22.                                 for (int x5 = x1; x5<= n; x5++)
  23.                                 {
  24.                                     if (x2 < x5 && x1 < x5)
  25.                                     {
  26.                            
  27.                                       Console.Write($"{x1}{x2}{(char)x3}{(char)x4}{x5} ");
  28.                                        
  29.                                     }
  30.                                 }
  31.                             }
  32.  
  33.                         }
  34.                     }
  35.  
  36.                 }
  37.            
  38.  
  39.  
  40.  
  41.            
  42.         }
  43.     }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment