Advertisement
Niicksana

Stupid Password Generator

Dec 3rd, 2017
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.12 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace Stupid_Password_Generator
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int n = int.Parse(Console.ReadLine());
  14.             int b = int.Parse(Console.ReadLine());
  15.             var spece = " ";
  16.             for (int sym1 = 1; sym1 <= n; sym1++)
  17.             {
  18.                 for (int sym2 = 1; sym2 <= n; sym2++)
  19.                 {
  20.                     for (char sym3 = 'a'; sym3 < 'a' + b; sym3++)
  21.                     {
  22.                         for (char sym4 = 'a'; sym4 < 'a' + b; sym4++)
  23.                         {
  24.                             for (int sym5 = Math.Max(sym1, sym2) + 1; sym5 <= n; sym5++)
  25.                             {
  26.                                 Console.Write("{0}{1}{2}{3}{4}", sym1, sym2, sym3, sym4, sym5);
  27.                                 Console.Write(" ");
  28.                             }
  29.                         }
  30.                     }
  31.                 }
  32.             }
  33.             Console.WriteLine();
  34.         }
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement