-
Notifications
You must be signed in to change notification settings - Fork 0
/
A.PAS
executable file
·65 lines (58 loc) · 1.09 KB
/
A.PAS
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
57
58
59
60
61
62
63
64
65
program a;
uses crt,graph;
var
k,treiber,modus:integer;
v,x,t,dt:real;
ortx1,ortx2,ortx3:string;
procedure graphik;
begin
treiber:=detect;
initgraph(treiber,modus,'');
setbkcolor(1);
setcolor(15);
line(10,30,630,30);
line(10,450,630,450);
line(10,30,10,450);
line(630,30,630,450);
outtextxy(400,380,'v = m/s');
outtextxy(400,400,'t = s');
outtextxy(400,420,'x = m');
outtextxy(235,15,'Gleichf”rmige Bewegung ');
end;
procedure setz;
begin
setcolor(15);
str(t:4:2,ortx2);
outtextxy(445,400,ortx2);
str(x:4:2,ortx3);
outtextxy(445,420,ortx3);
setfillstyle(1,12);
sector(100+round(80*x),240,0,360,3,3);
end;
procedure loesch;
begin
setcolor(1);
setfillstyle(1,1);
sector(100+round(80*x),240,0,360,3,3);
outtextxy(445,400,ortx2);
outtextxy(445,420,ortx3);
end;
{MAIN}
begin
graphik;
v:=1.5;
str(v:4:2,ortx1);
outtextxy(445,380,ortx1);
t:=0;
dt:=0.001;
x:=v*t;
setz;
delay(30000);
repeat
loesch;
t:=t+dt;
x:=v*t;
setz;
until x>=5;
repeat until keypressed;
end.