Advertisement
fbinnzhivko

06. Stupid Password Generator

Mar 15th, 2016
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.70 KB | None | 0 0
  1. using System;
  2.  
  3. class Program
  4. {
  5.     static void Main()
  6.     {
  7.         var n = int.Parse(Console.ReadLine());
  8.         var l = int.Parse(Console.ReadLine());
  9.  
  10.         for (int d1 = 1; d1 <= n; d1++)
  11.         {
  12.             for (int d2 = 1; d2 <= n; d2++)
  13.             {
  14.                 for (var l1 = 'a'; l1 < 'a'+1; l1++)
  15.                 {
  16.                     for (var l2 ='a'; l2 < 'a' + 1; l2++)
  17.                     {
  18.                         for (int d3 = Math.Max(d1,d2); d3 <n ; d3++)
  19.                         {
  20.                             Console.WriteLine("{0}{1}{2}{3}{4}",d1,d2,l1,l2,d3);
  21.                         }
  22.                     }
  23.                 }
  24.             }
  25.         }
  26.  
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement