namespace LR_24_НомерВарианта1
public static void Main()
Console.WriteLine("Введите строку");
string str1 = Console.ReadLine();
Console.WriteLine("кол-во символов в строке: {0}", str1.Length);
for (int i = 0; i < str1.Length; i++)
Console.WriteLine("кол-во символов в строке без пробелов: {0}", str1.Length-c);
Console.WriteLine("Введите строку");
string str2 = Console.ReadLine();
Console.WriteLine("Выберите тип изменения\n1.верхний регистр\n2.нижний регистр\n3.инвертированный регистр");
int choice = Convert.ToInt32(Console.ReadLine());
for (int i = 0; i < str2.Length; i++)
if (Char.IsLower(str2[i]))
empty += Char.ToUpper(str2[i]);
empty += Char.ToLower(str2[i]);
Console.WriteLine("{0}", str2);
Console.WriteLine("{0}",RandomPassword());
static string RandomPassword()
Random rnd = new Random();
Console.WriteLine("Введите кол-во символов в пороле");
int length = Convert.ToInt32(Console.ReadLine());
for (int i = 0; i < length; i++)
str += Convert.ToChar(rnd.Next(65, 91));
for (int i = 0; i < length; i++)
empty += Char.ToLower(str[i]);
empty += Char.ToUpper(str[i]);