Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace _06.Safe_password_Gen
- {
- class Program
- {
- static void Main(string[] args)
- {
- int a = int.Parse(Console.ReadLine());
- int b = int.Parse(Console.ReadLine());
- int numPass = int.Parse(Console.ReadLine());
- int counter = 0;
- for (int A = (char)'#'; A <= (char)'7'; A++)
- {
- for (int B = (char)'@'; B <= (char)'`'; B++)
- {
- for (int x = 1; x <= a; x++)
- {
- for (int y = 1; y <= b; y++)
- {
- if (A > 55)
- {
- A = 35;
- }
- if (B > 96)
- {
- B = 64;
- }
- counter++;
- if (counter <= numPass)
- {
- Console.Write($"{(char)A}{(char)B}{x}{y}{(char)B}{(char)A}|");
- A++;
- B++;
- if (x == a && y == b)
- {
- return;
- }
- }
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment