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

7. Using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

class Program

{

static void Main(string[] args)

{

int r =8;

int a = 90;

int b = 45;

int c = 45;

double a1 = Convert.ToDouble(2*r*Math.Sin(a));

Console.WriteLine(a1);

double b1 = Convert.ToDouble(2 * r * Math.Sin(b));

Console.WriteLine(b1);

double c1 = Convert.ToDouble(2 * r * Math.Sin(c));

Console.WriteLine(c1);

Console.ReadKey();

}

}

}

9. Using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

class Program

{

static void Main(string[] args)

{

int aj;

int sj;

Console.Write("Algashki joldi engiz:");

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

Console.Write("Songi joldi engiz:");

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

int k = (sj - aj) * 39;

Console.Write(k);

Console.ReadKey();

}

}

}

10. Using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

class Fermer

{

static void Main(string[] args)

{

int numberofcows;

Console.Write("siirlar sani:");

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

Console.Write("jemge ketetin karji:");

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

Console.Write("ar shopanga 1-siirga tolenetin karji:");

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

int sum=numberofcows*(shop+jem);

Console.Write("jalpi soma:"+sum);

Console.ReadKey();

}

}

}

11. Using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

class talkaboutyour

{

public string name;

public int r;

public talkaboutyour(string n, int a)

{

name = n;

r = a;

}

public void Show()

{Console.WriteLine("Имя = " + name + "\tРост = " + r);

}}

class tallguy

{

static void Main()

{

try

{

talkaboutyour obj = new talkaboutyour("Kazyna", 180); obj.Show();

}

catch (Exception er)

{ Console.WriteLine(er.Message);

}

Console.Read();

}}}

12. Using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.IO;

namespace ConsoleApplication1

{ class Program

{ static void Main(string[] args)

{ try

{ StreamWriter sw = new StreamWriter("C:\\Test.txt");

List<string> words = new List<string>();

string s="North South East West Flamingo";

while (true)

{ if (s == "$exit")

break;

else

words.Add(s); }

for (int i = words.Count - 1; i >= 0; i--)

{ sw.WriteLine(words[i]);

} sw.Close();

}

catch (Exception e)

{

Console.WriteLine("Exception: " + e.Message);

}

finally

{

Console.WriteLine("Executing finally block.");

}

Console.ReadKey();

}

}}

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