Advertisement
vencinachev

Passwords

Nov 21st, 2021
1,321
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.94 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Loops
  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 a = 1; a <= n; a++)
  13.             {
  14.                 for (int b = 1; b <= n; b++)
  15.                 {
  16.                     for (char c  = 'a'; c < 'a' + l; c ++)
  17.                     {
  18.                         for (char d = 'a'; d < 'a' + l; d++)
  19.                         {
  20.                             for (int e = 1; e <= n; e++)
  21.                             {
  22.                                 if (e >= a + b)
  23.                                 {
  24.                                     Console.Write($"{a}{b}{c}{d}{e} ");
  25.                                 }
  26.                             }
  27.                         }
  28.                     }
  29.                 }
  30.             }
  31.             Console.WriteLine();
  32.         }
  33.     }
  34. }
  35.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement