Advertisement
aggressiveviking

Untitled

Feb 16th, 2020
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.97 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _05.PasswordGenerator
  4. {
  5.     class PasswordGenerator
  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 i1 = 1; i1 < n; i1++)
  13.             {
  14.                 for (int i2 = 1; i2 < n; i2++)
  15.                 {
  16.                     for (int i3 = 'a'; i3 < 'a' + l; i3++)
  17.                     {
  18.                         for (int i4 = 'a'; i4 < 'a' + l; i4++)
  19.                         {
  20.                             for (int i5 = 2; i5 <= n; i5++)
  21.                             {
  22.  
  23.                                 if (i5 > i1 && i5 > i2)
  24.                                 {
  25.                                     Console.Write($"{i1}{i2}{(char)i3}{(char)i4}{i5} ");
  26.                                 }
  27.                             }
  28.                         }
  29.                     }
  30.                 }
  31.             }
  32.         }
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement