Repository navigation
Expand file tree
/
Copy pathProgram.cs
More file actions
59 lines (41 loc) · 1.43 KB
/
Copy pathProgram.cs
File metadata and controls
59 lines (41 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Keygen_Generator
{
internal class Program
{
static void Main(string[] args)
{
Console.Title = "Keygen Generator";
Random rnd = new Random();
Console.Write("How many keys do you want to generate: ");
int adet = int.Parse(Console.ReadLine());
for (int k = 0; k < adet; k++)
{
for (int j = 0; j < 5; j++)
{
for (int i = 0; i < 5; i++)
{
int charOrDigit = rnd.Next(2);
if (charOrDigit == 0)
{
char randomDigit = Convert.ToChar(rnd.Next(48, 58));
Console.Write(Convert.ToChar(randomDigit));
}
else
{
char randomLetter = Convert.ToChar(rnd.Next(65, 91));
Console.Write(Convert.ToChar(randomLetter));
}
}
if (j < 4)
Console.Write("-");
}
Console.WriteLine();
}
Console.ReadLine();
}
} }