М
Молодежь
К
Компьютеры-и-электроника
Д
Дом-и-сад
С
Стиль-и-уход-за-собой
П
Праздники-и-традиции
Т
Транспорт
П
Путешествия
С
Семейная-жизнь
Ф
Философия-и-религия
Б
Без категории
М
Мир-работы
Х
Хобби-и-рукоделие
И
Искусство-и-развлечения
В
Взаимоотношения
З
Здоровье
К
Кулинария-и-гостеприимство
Ф
Финансы-и-бизнес
П
Питомцы-и-животные
О
Образование
О
Образование-и-коммуникации

Даны 4 точки a1(x1y1) a2(x2y2) a3(x3,y3) a4(x4,y4) определить будут ли они вершинами параллелограмма информатик

👇
Ответ:
lapshinauly
lapshinauly
26.09.2021
Type point = record
       x,y: real;
     end;
var vc: array [1..4] of point;
    bg,nd: point;
    i,j,k,m: integer;
begin  writeln('координаты точек - через пробел ');
  for i:=1 to 4 do
  begin
    write('точка  ',i,'    ');
    readln(vc[i].x,vc[i].y);
  end;
{ сравнение векторов }
    m:=0;
    for i:=2 to 4 do
    begin
      bg.x:=vc[i].x-vc[1].x;
      bg.y:=vc[i].y-vc[1].y;
      j:=1;  k:=1;
      while ((j=1) or (j=i)) do j:=j+1;
      while ((k=1) or (k=i) or (k=j)) do k:=k+1;
      nd.x:=vc[j].x-vc[k].x;
      nd.y:=vc[j].y-vc[k].y;
      if ((bg.x=nd.x) and (bg.y=nd.y)) or
       ((bg.x=-nd.x) and (bg.y=-nd.y)) then
       begin
          m:=1;
          break;
       end;
   end;
   if m=1 then writeln('точки образуют параллелограмм')
   else writeln('точки не образуют параллелограмм');
end.
4,4(99 оценок)
Открыть все ответы
Ответ:
alekseislepsov2008
alekseislepsov2008
26.09.2021

1)

using System;

using System.Collections.Generic;

using System.Collections.Specialized;

namespace ConsoleApp3

{

   class Program

   {

       static void Main(string[] args)

       {

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

           Console.WriteLine(num % 2 == 0 ? "Чётное" : "Нечётное");

           Console.WriteLine(num / 10 + num % 10);

       }

   }

}

2)

using System;

using System.Collections.Generic;

using System.Collections.Specialized;

namespace ConsoleApp3

{

   class Program

   {

       static void Main(string[] args)

       {

           double[] seconds = new double[8];

           string[] athletes = new string[8];

           double sum = 0;

           double maxN = 0;

           int max = 0;

           for (int i = 0; i < 8; i++)

           {

               Console.WriteLine($"Введите фамилию {i + 1}-го участника и его результат: ");

               athletes[i] = Console.ReadLine();

               seconds[i] = Convert.ToDouble(Console.ReadLine());

               sum += seconds[i];

               if (seconds[i] > maxN)

               {

                   maxN = seconds[i];

                   max = i;

               }

           }

           Console.WriteLine($"\n\nСредний результат участников - {sum / 8}");

           Console.WriteLine($"Лучший результат у участника с фамилией {athletes[max]} - {maxN}");

       }

   }

}

4,6(21 оценок)
Ответ:
Iist
Iist
26.09.2021

1)

using System;

using System.Collections.Generic;

using System.Collections.Specialized;

namespace ConsoleApp3

{

   class Program

   {

       static void Main(string[] args)

       {

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

           Console.WriteLine(num % 2 == 0 ? "Чётное" : "Нечётное");

           Console.WriteLine(num / 10 + num % 10);

       }

   }

}

2)

using System;

using System.Collections.Generic;

using System.Collections.Specialized;

namespace ConsoleApp3

{

   class Program

   {

       static void Main(string[] args)

       {

           double[] seconds = new double[8];

           string[] athletes = new string[8];

           double sum = 0;

           double maxN = 0;

           int max = 0;

           for (int i = 0; i < 8; i++)

           {

               Console.WriteLine($"Введите фамилию {i + 1}-го участника и его результат: ");

               athletes[i] = Console.ReadLine();

               seconds[i] = Convert.ToDouble(Console.ReadLine());

               sum += seconds[i];

               if (seconds[i] > maxN)

               {

                   maxN = seconds[i];

                   max = i;

               }

           }

           Console.WriteLine($"\n\nСредний результат участников - {sum / 8}");

           Console.WriteLine($"Лучший результат у участника с фамилией {athletes[max]} - {maxN}");

       }

   }

}

4,8(20 оценок)
Это интересно:
Новые ответы от MOGZ: Информатика
logo
Вход Регистрация
Что ты хочешь узнать?
Спроси Mozg
Открыть лучший ответ