Вопрос задан 01.08.2018 в 22:49. Предмет Информатика. Спрашивает Сівак Вова.

Cоставить программу вывода на экран 5 олимпийских колец разного цвета

0 0
Перейти к ответам

Ответы на вопрос

Внимание! Ответы на вопросы дают живые люди. Они могут содержать ошибочную информацию, заблуждения, а также ответы могут быть сгенерированы нейросетями. Будьте внимательны. Если вы уверены, что ответ неверный, нажмите кнопку "Пожаловаться" под ответом.
Отвечает Мурашов Даниил.
Uses graphabc;
var x,y,r:integer;
begin
setwindowsize(450,300);
setwindowtitle('Олимпийские кольца');
setpenwidth(1);
setpencolor(clblue);x:=100;y:=100;r:=50;circle(x,y,r);
setpencolor(clblack);x:=220;y:=100;r:=50;circle(x,y,r);
setpencolor(clred);x:=340;y:=100;r:=50;circle(x,y,r);
setpencolor(clyellow);x:=150;y:=150;r:=50;circle(x,y,r);
setpencolor(clgreen);x:=270;y:=150;r:=50;circle(x,y,r);
end.
0 0
Отвечает нейросеть ChatGpt. Будьте внимательны, ответы нейросети могут содержать ошибочные или выдуманные данные.

Program to Display 5 Olympic Rings of Different Colors

To display 5 Olympic rings of different colors on the screen, you can use a programming language like Python. Below is a simple program using the `turtle` module to achieve this:

```python import turtle

# Create a turtle object t = turtle.Turtle()

# Set the speed of the turtle t.speed(10)

# Set the initial position for the first ring t.penup() t.goto(-120, 0) t.pendown()

# Draw the first ring (blue) t.pensize(10) t.color("blue") t.circle(50)

# Set the initial position for the second ring t.penup() t.goto(0, 0) t.pendown()

# Draw the second ring (black) t.pensize(10) t.color("black") t.circle(50)

# Set the initial position for the third ring t.penup() t.goto(120, 0) t.pendown()

# Draw the third ring (red) t.pensize(10) t.color("red") t.circle(50)

# Set the initial position for the fourth ring t.penup() t.goto(-60, -50) t.pendown()

# Draw the fourth ring (yellow) t.pensize(10) t.color("yellow") t.circle(50)

# Set the initial position for the fifth ring t.penup() t.goto(60, -50) t.pendown()

# Draw the fifth ring (green) t.pensize(10) t.color("green") t.circle(50)

# Hide the turtle and display the result t.hideturtle() turtle.done() ```

This program uses the `turtle` module to draw 5 Olympic rings of different colors on the screen. When you run this program, a window will open, and the rings will be displayed as per the Olympic symbol.

Note: This program assumes that you have Python and the `turtle` module installed on your system.

0 0

Топ вопросов за вчера в категории Информатика

Последние заданные вопросы в категории Информатика

Задать вопрос