Карычч
12.01.2020 07:49

Zephrofel pills are the type of customary dietary upgrade that will lead you to manage the re-foundation of the sexual execution and duration. this will likewise add to the progression of an all the more longer continuing arrangement of erections. it will make your muscles fit and more grounded and just grows your persevering farthest point on the bed.click here

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
ДанькоДенис2018
17.05.2023 19:53
Перебираешь все взаимно простые m > n разной четности, так чтобы m*m было меньше 30. И формируешь тройки по формуле:
k*(m*m-n*n, 2*m*n, m*m + n*n)

Например так:
function gcd(a,b: integer): integer;
begin
  if b = 0 then gcd := a
  else if (a > b) and (b > 0) then gcd := gcd(b, a mod b)
  else gcd := gcd(b, a);
end;

procedure Print(m,n:integer);
var i, a, b, c: integer;
begin
  repeat
    i := i + 1;
    a := (m*m-n*n)*i;
    b := 2*m*n*i;
    c := (m*m+n*n)*i;
    if c < 30 then
      writeln(a, ' ', b, ' ', c)
    else break;
  until false;
end;

var m, n, s: integer;
begin
  s := Trunc(Sqrt(30));
  for m := 1 to s do
    for n := m + 1 to s do 
      if (gcd(n, m) = 1) and ((m mod 2)<>(n mod 2)) then
        Print(n, m)
end.
0,0(0 оценок)
Ответ:
айфон66666
15.01.2020 11:44

var

 n, i, k: integer;

begin

 repeat

   write('Введите натуральное число n= ');

   read(n);

 until n > 0;

 if n = 1 then writeln('Невозможно разложить на произведение простых множителей.')

 else

 begin

   write(n, '=');

   i := 2;

   while i <= n do

   begin

     k := 0;

     while n mod i = 0 do

     begin

       k := k + 1;

       n := n div i;

     end;

     if i < n then

     begin

       if k = 1 then write(i, '*')

       else if k > 1 then write(i, '^', k, '*');

     end

     else

     begin

       if k = 1 then write(i)

       else if k > 1 then write(i, '^', k);

     end;

     i := i + 1;

   end;

 end;

end.

0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota Оформи подписку
logo
Начни делиться знаниями
Вход Регистрация
Что ты хочешь узнать?
Спроси ai-бота