// тестировалось на C#.Net Framework 4.5
using System;
class Program
{
static void Main()
{
int x1 = 2, y1 = 1;
int x2 = 6, y2 = 5;
int x3 = 10, y3 = 1;
var a = Distance(x2, y2, x3, y3);
var b = Distance(x1, y1, x3, y3);
var c = Distance(x2, y2, x1, y1);
Console.WriteLine("S = {0}", Square(a, b, c));
Console.ReadKey();
}
//растояние между точками
static double Distance(int x1, int y1, int x2, int y2)
{
return Math.Sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
}
//формула герона
static double Square(double a, double b, double c)
{
var p = (a + b + c) / 2;
return Math.Sqrt(p * (p - a) * (p - b) * (p - c));
}
// теорема косинусов
static double Angle(double a, double b, double c)
{
return Math.Acos((b * b + c * c - a * a) / (2 * b * c));
}
static bool IsAcuteAngel(double alpha)
{
return alpha < Math.PI / 2;
}
}
var
n : integer;
S : decimal;
function fac(n : integer) : decimal;
begin
result := 1;
for var i := 1 to n do result := result * i;
end;
begin
write('введите n = ');
readln(n);
for var i := 1 to n do S := S+fac(i);
writeln('S=', S);
end.
var i,a,z:integer;
begin
for i:=1 to 5 do
begin
read(z);
if not( z mod 2 = 0) then a:=a+z;
end;
write('sum=',a);
end.
<h2>a×5</h2><h2>(дробь) × (х+3)</h2><h2>х-7</h2><h2 /><h2>5а</h2><h2>(дробь)×(х+3)</h2><h2>х-7</h2><h2 /><h2>Ответ:</h2><h2>5ах+15а</h2><h2>(дробь)</h2><h2>х-7</h2>