Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace PasswordGenerator
- {
- class Program
- {
- public static void Main()
- {
- int a = int.Parse(Console.ReadLine());
- char b = char.Parse(Console.ReadLine());
- char c = char.Parse(Console.ReadLine());
- int d = int.Parse(Console.ReadLine());
- int e = int.Parse(Console.ReadLine());
- int f = int.Parse(Console.ReadLine());
- decimal counter = decimal.Parse(Console.ReadLine());
- for (int i = 1; i <= a; i++)
- {
- for (char j = 'A'; j <= b; j++)
- {
- for (char k = 'a'; k <= c; k++)
- {
- for (int l = 1; l <= d; l++)
- {
- for (int m = 1; m <= e; m++)
- {
- for (int n = 1; n <= f; n++)
- {
- if (--counter == 0)
- {
- Console.WriteLine($"{ i}{ j}{ k}{ l}{ m}{ n}");
- Environment.Exit(0);
- }
- }
- }
- }
- }
- }
- }
- Console.WriteLine("No password on this position");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement