a o to i problem:
- Kod: Zaznacz wszystko
uses crt,graph;
var ster,tryb:integer;
i,x,y,a1,a2,b1,b2,c1,c2:integer;
kl:char;
suma,roznica,iloczyn:integer;
suma1,roznica1,iloczyn1,iloraz1:string;
iloraz:real;
procedure kalkulator;
begin
setfillstyle(1,lightblue);
bar(200,50,370,265);
line(200,50,370,50);
line(200,80,370,80);
x:=210; y:=100;
for i:=1 to 4 do
begin
setfillstyle(1,blue);
bar(x,y,x+30,y+30);
y:=y+40;
end;
x:=210; y:=100;
for i:=1 to 4 do
begin
setfillstyle(1,blue);
bar(x+40,y,x+30+40,y+30);
y:=y+40;
end;
x:=210; y:=100;
for i:=1 to 4 do
begin
setfillstyle(1,blue);
bar(x+40+40,y,x+30+40+40,y+30);
y:=y+40;
end;
x:=210; y:=100;
for i:=1 to 4 do
begin
setfillstyle(1,blue);
bar(x+40+40+40,y,x+30+40+40+40,y+30);
y:=y+40;
end;
outtextxy(213,228,'Esc');
outtextxy(262,228,'0');
outtextxy(302,228,'=');
outtextxy(342,228,'+');
outtextxy(222,188,'1');
outtextxy(262,188,'2');
outtextxy(302,188,'3');
outtextxy(342,188,'-');
outtextxy(222,148,'4');
outtextxy(262,148,'5');
outtextxy(302,148,'6');
outtextxy(342,148,'*');
outtextxy(222,108,'7');
outtextxy(262,108,'8');
outtextxy(302,108,'9');
outtextxy(342,108,'/');
end;
procedure wczytywanie1;
begin
textcolor(white);
kl:=readkey;
case kl of
'1':begin outtextxy(240,65,'1'); a1:=1; end;
'2':begin outtextxy(240,65,'2'); a1:=2; end;
'3':begin outtextxy(240,65,'3'); a1:=3; end;
'4':begin outtextxy(240,65,'4'); a1:=4; end;
'5':begin outtextxy(240,65,'5'); a1:=5; end;
'6':begin outtextxy(240,65,'6'); a1:=6; end;
'7':begin outtextxy(240,65,'7'); a1:=7; end;
'8':begin outtextxy(240,65,'8'); a1:=8; end;
'9':begin outtextxy(240,65,'9'); a1:=9; end;
'0':begin outtextxy(240,65,'0'); a1:=0; end;
end;
kl:=readkey;
case kl of
'1':begin outtextxy(249,65,'1'); b1:=1; end;
'2':begin outtextxy(249,65,'2'); b1:=2; end;
'3':begin outtextxy(249,65,'3'); b1:=3; end;
'4':begin outtextxy(249,65,'4'); b1:=4; end;
'5':begin outtextxy(249,65,'5'); b1:=5; end;
'6':begin outtextxy(249,65,'6'); b1:=6; end;
'7':begin outtextxy(249,65,'7'); b1:=7; end;
'8':begin outtextxy(249,65,'8'); b1:=8; end;
'9':begin outtextxy(249,65,'9'); b1:=9; end;
'0':begin outtextxy(249,65,'0'); b1:=0; end;
end;
c1:=a1*10+b1;
end;
procedure wczytywanie2;
begin
textcolor(white);
kl:=readkey;
case kl of
#43:outtextxy(261,65,'+');
#45:outtextxy(261,65,'-');
#42:outtextxy(261,65,'*');
#37:outtextxy(261,65,'/');
end;
end;
procedure wczytywanie3;
begin
textcolor(white);
kl:=readkey;
case kl of
'1':begin outtextxy(273,65,'1'); a2:=1; end;
'2':begin outtextxy(273,65,'2'); a2:=2; end;
'3':begin outtextxy(273,65,'3'); a2:=3; end;
'4':begin outtextxy(273,65,'4'); a2:=4; end;
'5':begin outtextxy(273,65,'5'); a2:=5; end;
'6':begin outtextxy(273,65,'6'); a2:=6; end;
'7':begin outtextxy(273,65,'7'); a2:=7; end;
'8':begin outtextxy(273,65,'8'); a2:=8; end;
'9':begin outtextxy(273,65,'9'); a2:=9; end;
'0':begin outtextxy(273,65,'0'); a2:=0; end;
end;
kl:=readkey;
case kl of
'1':begin outtextxy(282,65,'1'); b2:=1; end;
'2':begin outtextxy(282,65,'2'); b2:=2; end;
'3':begin outtextxy(282,65,'3'); b2:=3; end;
'4':begin outtextxy(282,65,'4'); b2:=4; end;
'5':begin outtextxy(282,65,'5'); b2:=5; end;
'6':begin outtextxy(282,65,'6'); b2:=6; end;
'7':begin outtextxy(282,65,'7'); b2:=7; end;
'8':begin outtextxy(282,65,'8'); b2:=8; end;
'9':begin outtextxy(282,65,'9'); b2:=9; end;
'0':begin outtextxy(282,65,'0'); b2:=0; end;
end;
c2:=a2*10+b2;
end;
procedure obliczanie;
begin
case kl of
#43:begin suma:=c1+c2;
str(suma,suma1);
outtextxy(295,65,suma1); end;
#45:begin roznica:=c1-c2;
str(roznica,roznica1);
outtextxy(295,65,roznica1); end;
#42:begin iloczyn:=c1*c2;
str(iloczyn,iloczyn1);
outtextxy(295,65,iloczyn1); end;
#37:begin iloraz:=c1/c2;
str(iloraz,iloraz1);
outtextxy(295,65,iloraz1); end;
end;
kl:=readkey;
end;
begin
ster:=detect;
initgraph(ster,tryb,'c:\progra~1\tp\bpi');
repeat
kalkulator;
wczytywanie1;
wczytywanie2;
wczytywanie3;
obliczanie;
until kl=#27;
closegraph;
end.
No i właśnie jeśli ktoś włączył ten programik jest problem z pokazaniem sumy,ilorazu,dzielenia,różnicy dwóch liczb które do siebie dodaje, mnożę itp.. no i stąd ta prośba czy mógłby ktoś mi wspomóc paroma linijkami tekstu ?