ObolenskayaDiana
23.01.2020 00:21

Какова роль информационных технологий в обществе?

Нажмите на рекламу ниже и сразу увидите ответ
Популярные вопросы:
Ответ:
LunyaShag
21.07.2020 13:26
// PascalABC.NET 3.1, сборка 1218 от 12.04.2016
uses GraphABC;

procedure Sun(x, y: integer);
begin
  var c := 8;
 
  for var j := 1 to 100 do
  begin
    var r := 15 * c;
    var k := 0;
    if j mod 2 = 0 then k := 20;
    
    for var i := 0 to c do
    begin
      Brush.Color := RGB(230 - k, 230 - k, 0);
      Circle(x, y, r);
      k := k + 15;
      r := r - 15;
      sleep(100);
    end;
  end;
end;

procedure House(x, y: integer);
begin
  Brush.Color := clBrown;
  Pen.Color := clBurlyWood;
  var house_width := 300;
  var house_height := 300;
  var count := 10;
  var step := round(house_width / count);
 
  FillRectangle(x, y, x + house_width, y + house_height);
 
  var xx := x;
  for var i := 1 to count - 1 do
  begin
    xx := xx + step;
    Line(xx, y, xx, y + house_height);
  end;
 
  Brush.Color := clGray;
  FillRectangle(x + 100, y + 100, x + 200, y + 210);
  Brush.Color := clYellow;
  FillRectangle(x + 105, y + 105, x + 195, y + 150);
  Brush.Color := clRed;
  FillRectangle(x + 105, y + 155, x + 150, y + 205);
  Brush.Color := clBlue;
  FillRectangle(x + 155, y + 155, x + 195, y + 205);
 
  MoveTo(x + house_width div 2, y - 80);
  LineTo(x + house_width, y, Pen.Color);
  LineTo(x, y, Pen.Color);
  LineTo(x + house_width div 2, y - 80, Pen.Color);
  FlooDfill(x + house_width div 2, y - 10, clOlive);
 
  Brush.Color := clRed;
  Circle(x + house_width div 2, y - 35, 30);
end;

procedure Turtoise(x, y: integer);
begin
  Brush.Color := clGreen;
  Pen.Color := clGreen;
  FillRectangle(x + 5, y + 15, x - 20, y + 24);
  FillRectangle(x + 50, y, x + 30, y + 70);
  FillRectangle(x + 100, y, x + 120, y + 70);
  FillCircle(x + 170, y, 30);
 
  Brush.Color := clWhite;
  FillCircle(x + 180, y - 20, 10);
 
  Brush.Color := clBlack;
  FillCircle(x + 182, y - 18, 2);
  Brush.Color := clRed;
  FillRectangle(x + 180, y, x + 200, y + 4);
  Brush.Color := clBrown;
  FillEllipse(x, y - 10, x + 150, y + 50);
end;

begin
  Window.Init(0, 0, 1920, 1000, clBlue);
  Brush.Color := clLimeGreen;
  Rectangle(0, 580, 1920, 1018);
 
  House(700, 380);
  Turtoise(300, 600);
  Turtoise(900, 750);
  Sun(1200, 200);
end.
0,0(0 оценок)
Ответ:
FireLive
08.10.2022 12:44
Var s:string;    d1,m1,g1,d2,m2,g2,t,c:integer;    p:boolean;    k:byte;begin
k:=0;
writeln('Введите дату в формате дд.мм.гг');readln(s); val(copy(s,7,2),t,c);{преобразуем год в число}if (c<>0)or(t<0) then k:=1 else g1:=t;{определим високосный год или нет}if (((g1+2000) mod 100<>0)and((g1+2000) mod 4=0))or((g1+2000) mod 400=0) then p:=trueelse p:=false;
val(copy(s,4,2),t,c);if (c<>0)or not(t in [1..12]) then k:=1 else m1:=t;
val(copy(s,1,2),t,c);if (c<>0)or((m1 in [1,3,5,7,8,10,12])and not(t in [1..31]))         or((m1 in [4,6,9,11])and not(t in [1..30]))         or(p and(m1=2)and not(t in [1..29]))         or(not p and(m1=2)and not(t in [1..28]))then k:=1 else d1:=t;if k=1 thenbeginwriteln('Дата введена неверно!');endelsebeginif(m1=1)and(d1=1)then begin  d2:=31;  m2:=12;  g2:=g1-1; end
else if ((m1 in [5,7,10,12]) and(d1=1))then begin  d2:=30;  m2:=m1-1;  g2:=g1; end
else if ((m1 in [2,4,6,8,9,11]) and(d1=1))then begin  d2:=31;  m2:=m1-1;  g2:=g1; end
else if(m1=3)and (d1=1) then begin  if p then d2:=29 else d2:=28;  m2:=m1-1;  g2:=g1; end
else begin  d2:=d1-1;  m2:=m1;  g2:=g1; end;writeln('Предыдущая дата:');if d2<10 then write('0',d2,'.')else write(d2,'.');if m2<10 then write('0',m2,'.')else write(m2,'.');write(g2);end;end.
0,0(0 оценок)
Полный доступ
Позволит учиться лучше и быстрее. Неограниченный доступ к базе и ответам от экспертов и ai-bota Оформи подписку
logo
Начни делиться знаниями
Вход Регистрация
Что ты хочешь узнать?
Спроси ai-бота