BiologEgor
11.02.2021 11:58

очень надо информатика черепашка очень надо информатика черепашка ">

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
аня2913
04.01.2021 08:05

Так пойдёт?

Объяснение:

program Zeldaproj1;

{$mode objfpc}{$H+}

uses

{$IFDEF UNIX}{$IFDEF UseCThreads}

 cthreads,

 {$ENDIF}{$ENDIF}

 Classes

 { you can add units after this };

const z=100;

type mas=array[1..z] of integer;

var

 u1:mas;

 max1,max2,max3:integer;

procedure ch1(n:integer);

var i:integer;

begin

for i:=1 to n do

u1[i]:=random(100);

for i:=1 to n do

writeln('Элементы массива: ',u1[i]);

max1:=u1[i];max2:=u1[i];max3:=u1[i];

for i:=1 to n do

if u1[i]>max1 then begin

max1:=u1[i];

end;

for i:=1 to n do

if (u1[i]>max2) and (u1[i]<>max1) then begin

max2:=u1[i];

end;

writeln('max1: ',max1,' max2: ',max2,' max3: ',max3);

end;

begin

ch1(5);

readln;

ch1(7);

readln;

ch1(13);

readln;

end.

0,0(0 оценок)
Ответ:
SupercellTV
11.09.2021 03:41

#include <iostream>

#include<vector>

using namespace std;

int square(int x){

for (int i = 1; i <= 45; ++i){

if (i * i <= x){

continue;

}

return (i - 1) * (i - 1);

}

}

int main()

{

int x, y, xwas, ywas, xywas;

cin >> x >> y;

xwas = square(x);

ywas = square(y);

xywas = square(x + y);

if (xwas + ywas < xywas){

cout << "Petya gives paint to Vasya";

}

else if (xwas + ywas == xywas){

cout << "Equal";

}

else {

cout << "Petya leaves paint to himself";

}

return 0;

}#include <iostream>

#include<vector>

using namespace std;

int square(int x){

for (int i = 1; i <= 45; ++i){

if (i * i <= x){

continue;

}

return (i - 1) * (i - 1);

}

}

int main()

{

int x, y, xwas, ywas, xywas;

cin >> x >> y;

xwas = square(x);

ywas = square(y);

xywas = square(x + y);

if (xwas + ywas < xywas){

cout << "Petya gives paint to Vasya";

}

else if (xwas + ywas == xywas){

cout << "Equal";

}

else {

cout << "Petya leaves paint to himself";

}

return 0;

}

Объяснение:

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