Created
April 11, 2022 10:51
-
-
Save nesendal/9b1b1191eafa9b2ef6a1285349bf7474 to your computer and use it in GitHub Desktop.
Rakamlar, büyük harfler ya da küçük harflerden oluşacak ve sırası karışık gelecek şifreyi üretme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
namespace ConsoleApp1 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
string sifre = string.Empty; | |
List<string> ifadeler = new List<string>(); | |
for (int i = 65; i <= 90 ; i++) | |
{ | |
ifadeler.Add(((char)i).ToString()); | |
} | |
for (int i = 97; i <= 122; i++) | |
{ | |
ifadeler.Add(((char)i).ToString()); | |
} | |
for (int i = 48; i <= 57; i++) | |
{ | |
ifadeler.Add(((char)i).ToString()); | |
} | |
Random rnd = new Random(); | |
for (int i = 0; i < 5; i++) | |
{ | |
int sayi=rnd.Next(0, ifadeler.Count + 1); | |
sifre+=ifadeler[sayi]; | |
} | |
Console.WriteLine(sifre); | |
//nagihanesendal.blogspot.com | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment