Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace _06.StupidPasswordGenerator
- {
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- public class PasswordGeneratorMain
- {
- public static void Main(string[] args)
- {
- int n = int.Parse(Console.ReadLine());
- int l = int.Parse(Console.ReadLine());
- int firstLatinLetterWeight = Convert.ToInt32('a');
- for (int firstDigit = 1; firstDigit <= n; firstDigit++)
- {
- for (int secondDigit = 1; secondDigit <= n; secondDigit++)
- {
- for (int firstLetter = firstLatinLetterWeight; firstLetter < firstLatinLetterWeight + l; firstLetter++)
- {
- for (int secondLetter = firstLatinLetterWeight; secondLetter < firstLatinLetterWeight + l; secondLetter++)
- {
- for (int lastDigit = 1; lastDigit <= n; lastDigit++)
- {
- if (lastDigit > firstDigit && lastDigit > secondDigit)
- {
- Console.Write(
- "{0}{1}{2}{3}{4} ",
- firstDigit,
- secondDigit,
- Convert.ToChar(firstLetter),
- Convert.ToChar(secondLetter),
- lastDigit);
- }
- }
- }
- }
- }
- }
- Console.WriteLine();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement