Witam. Otóż mam problem z moim programem który jest na zaliczenie.
Siedze nad nim i dalej nie wiem co jest w nim nie tak i proszę Was o pomoc. Oto jego kod:
program flagi;
uses crt, graph;
var
wybor:char;
s,t:integer;
procedure menu;
begin
setbkcolor(1);
setcolor (12);
rectangle (0,240,250,479);
outtextxy (100,245, 'Menu');
outtextxy (5,265, 'l.CZECHY');
outtextxy(5,285, '2.LUKSEMBURG');
outtextxy (5,305, '3.SZWECJA');
outtextxy (5,325, '4.PERU');
outtextxy (5,345, '5.WLOCHY');
outtextxy (25,465, 'q - wyjscie');
outtextxy (150,465, 'w - menu');
end;
procedure czechy;
begin
setlinestyle(0,0,1);
rectangle(170,60,470,240);
line(170,150,470,150);
line(290,150,170,240);
line(290,150,170,60);
setcolor(1);
line(171,150,289,150);
setcolor(15);
setfillstyle(1,15);
floodfill(190,70,15);
setcolor(1);
setfillstyle(1,1);
floodfill(190,90,15);
floodfill(190,155,15);
setcolor(4);
setfillstyle(1,4);
floodfill(190,235,15);
line(290,150,170,240);
outtextxy(10,10,'CZECHY');
readkey;
cleardevice;
menu;
end;
procedure luksemburg;
begin
setcolor(4);
rectangle (0,0 ,639,479);
line (0,160, 639, 160) ;
line(0,320,639,320);
setcolor(15);
setfillstyle(1,4);
floodfill(10,10,4);
setfillstyle(1,15);
floodfill(300,300,4) ;
setfillstyle(1,1);
floodfill(450,450,4) ;
outtextxy(10,10,'Luksemburg') ;
readkey;
cleardevice;
menu;
end;
procedure szwecja;
begin
setlinestyle(0,0,1);
setcolor(14);
rectangle(170,60,470,240);
rectangle(170,140,470,170);
rectangle(270,60,300,240);
setfillstyle(1,14);
floodfill(275,145,14);
floodfill(175,145,14);
floodfill(305,145,14);
floodfill(275,135,14);
floodfill(275,175,14);
setfillstyle(1,9);
floodfill(175,135,14);
floodfill(175,175,14);
floodfill(305,175,14);
floodfill(305,135,14);
setcolor(15);
rectangle(170,60,470,240);
outtextxy(10,10, 'SZWECJA');
readkey;
cleardevice;
menu;
end;
procedure peru;
begin
setcolor(4);
rectangle(0,0,639,479);
line(213,0,213,639);
line(426,0,426,639) ;
setcolor(15) ;
setfillstyle (1,4) ;
floodfill(10,10,4) ;
setfillstyle(1,15) ;
floodfill(220,220,4) ;
setfillstyle(1,4) ;
floodfill(450,450,4);
outtextxy (10,10, 'Peru');
readkey;
cleardevice;
menu;
end;
procedure wlochy;
begin
setcolor(4) ;
rectangle(0,0,639,479) ;
line(213,0,213,639) ;
line(426,0,426,639);
setcolor(15) ;
setfillstyle(1,2);
floodfill (10,10,4);
setfillstyle (1,15);
floodfill(220,220,4) ;
setfillstyle (1,4) ;
floodfill(450,450,4) ;
outtextxy (10,10, 'Wlochy');
readkey;
cleardevice;
menu;
end;
begin
s:=detect;
initgraph(s,t,'');
cleardevice;
menu;
repeat wybor:=readkey;
if wybor='1' then polska;
if wybor='2' then luksemburg;
if wybor='3' then japonia;
if wybor='4' then peru;
if wybor='5' then wlochy;
if wybor='w' then menu;
until wybor='q'
end.
closegraph;