Skip to content

Instantly share code, notes, and snippets.

@nesendal
Created April 11, 2022 10:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nesendal/9b1b1191eafa9b2ef6a1285349bf7474 to your computer and use it in GitHub Desktop.
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
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