Matematíka fakultetí Algoritmlestiriw hám programmalastırıw texnologiyaları



Download 144,51 Kb.
bet2/4
Sana27.06.2022
Hajmi144,51 Kb.
#710394
1   2   3   4
Bog'liq
Inamjan Omirbaev

For 2




internal class Program


{
static void Main(string[] args)
{
int n = Convert.ToInt32(Console.ReadLine());
double juap = n * n;
for (double i = 1; i <= n; i++)
{
juap += Math.Pow((n+i), 2);
}
Console.WriteLine(juap);
Console.ReadKey();
}
}



Funkciya 58



static double Leng(double xA, double yA, double xB, double yB)


{
double d = Math.Sqrt((xA - xB) * (xA - xB) + (yA - yB) * (yA - yB));
return d;
}

static double Perim(double xA, double yA, double xB, double yB, double xC,double yC)


{
double d_AB = Leng(xA, yA, xB, yB);
double d_AC = Leng(xA, yA, xC, yC);
double d_BC = Leng(xB, yB, xC, yC);
return d_AB + d_AC + d_BC;
}
static double Area(double xA, double yA, double xB, double yB, double xC, double yC)
{
double d_AB = Leng(xA, yA, xB, yB);
double d_AC = Leng(xA, yA, xC, yC);
double d_BC = Leng(xB, yB, xC, yC);
double p = Perim(xA, yA, xB, yB, xC, yC) / 2;
double S = Math.Sqrt(p * (p - d_AB) * (p - d_AC) * (p - d_BC));
return S;
}
Console.WriteLine("A noqatinin X ham Y noqatin kiritin");
double x1 = Convert.ToDouble(Console.ReadLine());
double y1 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("B noqatinin X ham Y noqatin kiritin");
double x2 = Convert.ToDouble(Console.ReadLine());
double y2 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("C noqatinin X ham Y noqatin kiritin");
double x3 = Convert.ToDouble(Console.ReadLine());
double y3 = Convert.ToDouble(Console.ReadLine());
Console.WriteLine("D noqatinin X ham Y noqatin kiritin");
double x4 = Convert.ToDouble(Console.ReadLine());
double y4 = Convert.ToDouble(Console.ReadLine());

double A_x = x1;


double A_y = y1 ;
double B_x = x2 ;
double B_y = y2 ;
double C_x = x3 ;
double C_y = y3 ;
double D_x = x4 ;
double D_y = y4;

double p = Perim(A_x, A_y, B_x, B_y, C_x, C_y);


Console.WriteLine($"Perimetr ABD: " + p);
double S = Area(A_x, A_y, B_x, B_y, D_x, D_y);
Console.WriteLine($"Maydan ABD: " + S);
Console.WriteLine();
p = Perim(A_x, A_y, B_x, B_y, D_x, D_y);
Console.WriteLine($"Perimetr ABD: " + p);
S = Area(A_x, A_y, B_x, B_y, D_x, D_y);
Console.WriteLine($"Maydan ABD: " + S);
Console.WriteLine();
p = Perim(A_x, A_y, C_x, C_y, D_x, D_y);
Console.WriteLine($"Perimetr ACD: " + p);
S = Area(A_x, A_y, C_x, C_y, D_x, D_y);
Console.WriteLine($"Maydan ACD: " + S);
Console.ReadLine();



Download 144,51 Kb.

Do'stlaringiz bilan baham:
1   2   3   4




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©www.hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish