-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogramcode.pas
More file actions
57 lines (43 loc) · 960 Bytes
/
Copy pathprogramcode.pas
File metadata and controls
57 lines (43 loc) · 960 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
unit ProgramCode;
{$mode TP}{$H+}
interface
uses
SimulatorColors, SimulatorCrt, SimulatorGraphics;
procedure Run;
implementation
procedure Run;
var
i, x, y, c: Integer;
begin
Color(White, Black, Black);
InitGraph;
for c := 1 to 7 do
begin
SetColor(c);
for i := 0 to 30 do
PutPixel(Random(GetMaxX), Random(GetMaxY));
end;
for i := 1 to 10 do
begin
x := Random(GetMaxX - 50);
y := Random(GetMaxY - 50);
SetColor(Yellow);
Rectangle(x, y, x + 50, y + 50);
Bar(x + 1, y + 1, x + 49, y + 49, Green);
end;
for i := 1 to 5 do
begin
x := Random(GetMaxX - 50);
y := Random(GetMaxY - 50);
SetColor(Red);
Ellips(x, y, 30, 20);
FloodFill(x, y, Yellow, Red);
end;
Color(Black, White, Black);
GotoXY(20, 3);
Write('10 Rectangles, 5 Ellipses and many Pixels');
REPEAT UNTIL KeyPressed;
Color(White, Dblue, Dblue);
ClrScr;
end;
end.