Advertisement
hrimar

06StupidPasswordGenerator-Exam6March2016

Mar 7th, 2017
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.02 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _06StupidPasswordGenerator_6March2016
  4. {
  5.     class Program
  6.     {
  7.         static void Main()
  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 (char i3 = 'a'; i3 < 'a'+l; i3++)
  17.                     {
  18.                         for (char i4 = 'a'; i4 <'a'+l; i4++)
  19.                         {
  20.                             for (int i5 = 1+1; i5 <= n; i5++) // i5=Math.Max(d1, d2)+1 !!!
  21.                             {
  22.                                 if (i1>=i5 || i2>=i5) //  и тогава без това!!!
  23.                                 continue;
  24.                                 Console.Write($"{i1}{i2}{i3}{i4}{i5} ");
  25.                             }
  26.                         }
  27.                     }
  28.                 }
  29.             }
  30.             Console.WriteLine();
  31.         }
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement