MiroslavKisov

Stupid_Password_Generator_ver2

Jul 26th, 2017
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.05 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. namespace Stupid_Password_Generator
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             int n = int.Parse(Console.ReadLine());
  13.             int l = int.Parse(Console.ReadLine());
  14.             char[] chars = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' };
  15.             for (int i=1;i<n;i++)
  16.             {
  17.                 for(int j=1;j<n;j++)
  18.                 {
  19.                     for(int k=0;k<l;k++)
  20.                     {
  21.                         for(int m=0;m<l;m++)
  22.                         {
  23.                             for(int p =(Math.Max(i,j)+1);p<(n+1);p++)
  24.                             {
  25.                                 Console.Write($"{i}{j}{chars[k]}{chars[m]}{p}"+" ");
  26.                             }
  27.                         }
  28.                     }
  29.                 }
  30.             }
  31.         }
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment