Advertisement
Gesh4o

PasswordGenerator

Mar 7th, 2016
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. namespace _06.StupidPasswordGenerator
  2. {
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8.  
  9. public class PasswordGeneratorMain
  10. {
  11. public static void Main(string[] args)
  12. {
  13. int n = int.Parse(Console.ReadLine());
  14. int l = int.Parse(Console.ReadLine());
  15.  
  16. int firstLatinLetterWeight = Convert.ToInt32('a');
  17.  
  18. for (int firstDigit = 1; firstDigit <= n; firstDigit++)
  19. {
  20. for (int secondDigit = 1; secondDigit <= n; secondDigit++)
  21. {
  22. for (int firstLetter = firstLatinLetterWeight; firstLetter < firstLatinLetterWeight + l; firstLetter++)
  23. {
  24. for (int secondLetter = firstLatinLetterWeight; secondLetter < firstLatinLetterWeight + l; secondLetter++)
  25. {
  26. for (int lastDigit = 1; lastDigit <= n; lastDigit++)
  27. {
  28. if (lastDigit > firstDigit && lastDigit > secondDigit)
  29. {
  30. Console.Write(
  31. "{0}{1}{2}{3}{4} ",
  32. firstDigit,
  33. secondDigit,
  34. Convert.ToChar(firstLetter),
  35. Convert.ToChar(secondLetter),
  36. lastDigit);
  37. }
  38. }
  39. }
  40. }
  41. }
  42. }
  43. Console.WriteLine();
  44. }
  45. }
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement