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

1. using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

class Program

{

static void Main(string[] args)

{

double n;

Console.Write("san engiz:");

n = Convert.ToDouble(Console.ReadLine());

double s=0;

double i;

for (i = 1; i <= n; i++)

{

double k = System.Math.Pow(i, 2);

s +=k;

}

Console.WriteLine(s);

Console.ReadKey();

}

}

}

2. Using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

class Program

{

static void Main(string[] args)

{

Console.Write("200-ge deingi 25-ke kaldiksiz bolinetin sandar sani:");

int k = 0;

for (int i = 1; i <= 200; i++)

{

if (i % 25 == 0)

k++;

}

Console.WriteLine(k);

Console.ReadKey();

}

}

}

3. Using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

class Program

{

static void Main(string[] args)

{

Console.Write("summa:");

int s = 0;

for (int i = 21; i < 100; i++)

{

if (i % 3 == 0)

s+=i;

}

Console.WriteLine(s);

Console.ReadKey();

}

}

}

4. Using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

class Program

{

static void Main(string[] args)

{

Console.Write("olwem birlikti engiz:");

double m;

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

double k;

Console.Write("1 futka auistiru:");

k = 0.3048 * m;

Console.Write(k);

Console.WriteLine("1 drahm auistiru:");

k = 3.7325 * m;

Console.Write(k);

Console.WriteLine("1 duim auistiru:");

k = 25.3995 * m;

Console.Write(k);

Console.ReadKey();

}

}

}

5. Using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

class Program

{

static void Main(string[] args)

{

int a1;

Console.Write("a1:");

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

int d;

Console.Write("d:");

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

int n;

Console.Write("n:");

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

int s;

s = (2 * a1 + (n - 1) * d) * n / 2;

Console.WriteLine("arifmetikalik prog:"+s);

double l;

l = a1 * (Math.Pow(d, n) - 1) / (d - 1);

Console.WriteLine("geometrialik prog:" + l);

Console.ReadKey();

}

}

}

6. Using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

class Program

{

static void Main(string[] args)

{

int c = 5;

int a = 3;

int b;

b = Convert.ToInt32(Math.Sqrt(c * c - a * a));

Console.WriteLine(b);

int p;

p =( a + b + c)/2;

double r;

r = Convert.ToDouble(Math.Sqrt(((p - a) * (p - b) * (p - c))/p));

Console.WriteLine(r);

Console.ReadKey();

}

}

}

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