Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
C_esepter_Ris_1g__Zachita.docx
Скачиваний:
0
Добавлен:
01.05.2025
Размер:
37 Кб
Скачать
☆

13. Using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.IO;

namespace ConsoleApplication1

{

class Program

{

static void Main(string[] args)

{

var list = new List<string> { "black","red","yellow" };

list.Sort();

foreach (var value in list)

{

Console.WriteLine(value);

}

Console.ReadLine();

}

}

}

14. Using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

class Program

{

static void Main(string[] args)

{

Console.Write("footbalwinin nomerin 1-5 arasinda engiz:");

int n = Convert.ToInt32(Console.ReadLine());

switch (n)

{

case 1: Console.WriteLine("Nurbol"); break;

case2: Console.WriteLine("Abyl");break;

case3: Console.WriteLine("Maga");break;

case4: Console.WriteLine("Dastan");break;

case5: Console.WriteLine("Nurzhik");break;

}

Console.ReadKey();

}

}

}

15. Using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

class Program

{

static void Main(string[] args)

{

int a;

int b;

int c;

double d;

Console.Write("a=");

a = Convert.ToInt32(Console.ReadLine());

Console.Write("b=");

b = Convert.ToInt32(Console.ReadLine());

Console.Write("c=");

c = Convert.ToInt32(Console.ReadLine());

Console.ReadKey();

d = b * b - 4 * a * c;

double x1, x2;

x1=(-b-Math.Sqrt(d))/(2*a);

x2=(-b+Math.Sqrt(d))/(2*a);

Console.Write(x1);

Console.Write(x2);

Console.ReadKey();

}

}

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]