program animacja;
uses graph,crt;
var wybor:integer;
Procedure G;
var ster,tryb:integer;
begin
ster:=detect; initgraph(ster,tryb,'C\tp\BGI');
circle(320,240,30);
delay(1);
end;
procedure D;
var t,k,p,r,ster,a,b:real;
begin
clrscr;
writeln('Podaj A');
readln(a);
writeln('Podaj B');
readln(b);
writeln('Podaj R');
readln(r);
if a<=0 then writeln('Bok nie moze =0!');
if b<=0 then writeln('Bok nie moze =0!');
t:=a*b/2; p:=a*b; k:=a*a;
writeln('Twoje wyniki to T:',t:0:2);
writeln('K:',k:0:2);
writeln('P:',p:0:2);
readln;
delay(1);
end;
begin
clrscr;
writeln('Program wpierw wyliczy pola figur, a nastepnie narysuje je w trybie graficznym.');
writeln('Postapuj zgodnie z instrukcja! Kliknij 1.');
readln(wybor);
if wybor=1 then d;g;
delay(1000);
end.
uses graph,crt;
var wybor:integer;
Procedure G;
var ster,tryb:integer;
begin
ster:=detect; initgraph(ster,tryb,'C\tp\BGI');
circle(320,240,30);
delay(1);
end;
procedure D;
var t,k,p,r,ster,a,b:real;
begin
clrscr;
writeln('Podaj A');
readln(a);
writeln('Podaj B');
readln(b);
writeln('Podaj R');
readln(r);
if a<=0 then writeln('Bok nie moze =0!');
if b<=0 then writeln('Bok nie moze =0!');
t:=a*b/2; p:=a*b; k:=a*a;
writeln('Twoje wyniki to T:',t:0:2);
writeln('K:',k:0:2);
writeln('P:',p:0:2);
readln;
delay(1);
end;
begin
clrscr;
writeln('Program wpierw wyliczy pola figur, a nastepnie narysuje je w trybie graficznym.');
writeln('Postapuj zgodnie z instrukcja! Kliknij 1.');
readln(wybor);
if wybor=1 then d;g;
delay(1000);
end.
Zakładki