program kalkulacka;
uses crt,dos,graph;
var ch:char;
var a:integer;
var b,c,d:real;
var e,f,g:real;
var h,i,j:real;
var k,l,m:real;
var ovladac,grafmod:integer;
begin
repeat
clrscr;
gotoxy(0,1); for a:=0 to 79 do write('*');
gotoxy(33,2);writeln('Kalkulacka');
gotoxy(0,3); for a:=0 to 79 do write('*');
gotoxy(2,6);writeln('Scitanie - stlac 1');
gotoxy(2,7);writeln('Odcitanie - stlac 2');
gotoxy(2,8);writeln('Nasobenie - stlac 3');
gotoxy(2,9);writeln('Delenie - stlac 4');
gotoxy(2,10);writeln('Mat.vzorce - stlac 5');
gotoxy(2,11);writeln('Info - stlac 6');
gotoxy(0,13); for a:=0 to 79 do write('*');
gotoxy(2,14);writeln('Ukoncenie programu - stlac Esc');
gotoxy(0,15); for a:=0 to 79 do write('*');
ch:=readkey;
if (ch=#49) then begin
clrscr;
gotoxy(0,2);writeln('Scitanie');
gotoxy(0,3); for a:=0 to 79 do write('*');
gotoxy(0,6);writeln('Zadaj cisla, ktore chces spocitat :');
readln(b,c);
clrscr;
d:=b+c;
gotoxy(2,2);writeln(b:6:2,' + ',c:6:2,' = ',d:6:2);
readln;
end;
if (ch=#50) then begin
clrscr;
gotoxy(0,2);writeln('Odcitanie');
gotoxy(0,3); for a:=0 to 79 do write('*');
gotoxy(0,6);writeln('Zadaj cisla, ktore chces odcitat :');
readln(e,f);
clrscr;
g:=e-f;
gotoxy(2,2);writeln(e:6:2,' - ',f:6:2,' = ',g:6:2);
readln;
end;
if (ch=#51) then begin
clrscr;
gotoxy(0,2);writeln('Nasobenie');
gotoxy(0,3); for a:=0 to 79 do write('*');
gotoxy(0,6);writeln('Zadaj cisla, ktore chces vynasobit :');
readln(h,i);
clrscr;
j:=h*i;
gotoxy(2,2);writeln(h:6:2,' * ',i:6:2,' = ',j:6:2);
readln;
end;
if (ch=#52) then begin
clrscr;
gotoxy(0,2);writeln('Delenie');
gotoxy(0,3); for a:=0 to 79 do write('*');
gotoxy(0,6);writeln('Zadaj cisla, ktore chces vydelit :');
readln(k,l);
clrscr;
m:=k/l;
gotoxy(2,2);writeln(k:6:2,' : ',l:6:2,' = ',m:6:2);
readln;
end;
if (ch=#53) then begin
clrscr;
ovladac:=detect;
Initgraph(ovladac,grafmod,'C:\TP\BGI');
rectangle(20,20,80,80);
outtextxy(110,20,'Stvorec');
outtextxy(110,35,'S=a.a');
outtextxy(110,50,'o=4.a');
if (ch=#54) then begin
clrscr;
gotoxy(0,2);writeln('Info');
gotoxy(0,3); for a:=0 to 79 do write('*');
gotoxy(0,6);writeln('Kalkulacka : verzia 1.0');
gotoxy(0,7);writeln('Autor : Lubo');
gotoxy(0,8);writeln('Email : luboslav.kardos@centrum.cz');
gotoxy(0,9);writeln('Operacie : scitanie,odcitanie,nasobenie,delenie');
gotoxy(0,10);writeln('Vzorce : zakladne matematicke vzorce');
gotoxy(0,11);writeln('Konstanty : piblizne hodnoty zakladnych konstant');
readln;
end;
until (ch=#27);
clrscr;
gotoxy(33,13);writeln('MADE BY LUBO');
delay(800);