• Cделать в паскале светофор с помощью GraphABC, Ellipse и Rectangle.

Ответы 2

  • Нет
    • Автор:

      ochoa
    • 6 лет назад
    • 0
  • uses graphABC;

     

    procedure DrawLight(X, Y, R : Integer; C : Color);

    begin

     Brush.Color := C;

     Circle(X, Y, R);

    end;

     

    begin

     Randomize;

     var V := Random(1, 3);

     var(C1,C2,C3):=(clWhite,clWhite,clWhite);

     case V of

       1 : C1 := clRed;

       2 : C2 := clYellow;

       3 : C3 := clGreen;

     end;

     DrawLight(Window.Center.X, Window.Height div 10 * 2, Window.Height div 7, C1);

     DrawLight(Window.Center.X, Window.Height div 10 * 5, Window.Height div 7, C2);

     DrawLight(Window.Center.X, Window.Height div 10 * 8, Window.Height div 7, C3);

    end.

    В Паскале

    • Автор:

      gracie73
    • 6 лет назад
    • 0
  • Добавить свой ответ

Войти через Google

или

Забыли пароль?

У меня нет аккаунта, я хочу Зарегистрироваться

How much to ban the user?
1 hour 1 day 100 years