ivanov_ivan

StupidPasswordGenerator

Aug 25th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.04 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 StupidPasswordGenerator
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             var n = int.Parse(Console.ReadLine());
  14.             var l = int.Parse(Console.ReadLine());
  15.  
  16.             for(int i = 1; i < n; i++)
  17.             {
  18.                 for(int j = 1; j < n; j++)
  19.                 {
  20.                     for(int k = 97; k < 97 + l; k++)
  21.                     {
  22.                         for(int m = 97; m < 97 + l; m++)
  23.                         {
  24.                             for(int o = Math.Max(i , j) + 1; o <= n; o++)
  25.                             {
  26.                                 Console.Write("{0}{1}{2}{3}{4} " , i , j , (char)k , (char)m , o);
  27.                                 //Console.Write(i.ToString() + j + (char)k + (char)m + o + " ");
  28.                             }
  29.                         }
  30.                     }
  31.                 }
  32.             }
  33.         }
  34.     }
  35. }
Add Comment
Please, Sign In to add comment