Меню сайта

Задача №14

Построениеизображение заказанного четырехугольника.

uses graph,crt-

vargd,gm,choice:integer-

label 1,2,3,4-

begin

writeln (‘1-параллеограмм 2-прямоугольник 3-ромб 4-квадрат’)-

readln(choice)-

initgraph(gd,gm,’c:&#92-bp&#92-bgi’)-

IF choice = 1 THENGOTO 1-

IF choice = 2 THENGOTO 2-

IF choice = 3 THENGOTO 3-

IF choice = 4 THENGOTO 4-

1:

clearviewport-

LINE (320, 240,400,240)-

LINE (350, 290,430,290)-

LINE (320, 240,350,290)-

LINE (400, 240,430,290)-

repeat-

until keypressed-

halt-

2:

clearviewport-

rectangle(320,240,400, 290)-

repeat-

until keypressed-

halt-

3:

clearviewport-

LINE (320, 240,270,290)-

LINE (320, 240,370,290)-

LINE (320, 340,370,290)-

LINE (320, 340,270,290)-

repeat-

until keypressed-

halt-

4:

clearviewport-

rectangle(320,240,420, 340)-

repeat-

until keypressed-

halt-

closegraph-

end.

Категория: Графика в Паскале | Дата: 25.11.12

Меню раздела
Блок