Matematická kalkulačka
Delphi & Pascal (česká wiki)
Category: KMP (Club of young programmers)
Author: Ľuboslav Kardoš
Program: Kalkulacka2.pas
File exe: Kalkulacka2.exe
Author: Ľuboslav Kardoš
Program: Kalkulacka2.pas
File exe: Kalkulacka2.exe
Matematika(kalkulačka)
- sčítanie, odčítanie, delenie, násobenie
- vzorce na obsah, obvod, objem a povrch telies + grafická ukážka
- základné matematické konštanty
- sčítanie, odčítanie, delenie, násobenie
- vzorce na obsah, obvod, objem a povrch telies + grafická ukážka
- základné matematické konštanty
{ KALKULACKA.PAS } { Matematika(kalkulacka)-scitanie,odcitanie,delenie,nasobenie } { -vzorce na obsah,obvod,objem a povrch } { telies+ graficka ukazka } { -zakladne matematicke konstanty } { } { Author: uboslav Kardoç } { Datum: 18.04.2010 http://www.trsek.com } 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'); rectangle(20,120,160,180); outtextxy(190,120,'Obdlznik'); outtextxy(190,135,'S=a.b'); outtextxy(190,150,'o=2.(a+b)'); rectangle(20,240,80,300); rectangle(40,220,100,280); line(20,240,40,220); line(80,300,100,280); line(20,300,40,280); line(80,240,100,220); outtextxy(130,220,'Kocka'); outtextxy(130,235,'V=a.a.a'); outtextxy(130,250,'P=6.a.a'); rectangle(20,360,160,420); rectangle(40,340,180,400); line(20,420,40,400); line(20,360,40,340); line(160,420,180,400); line(160,360,180,340); outtextxy(210,360,'Kvader'); outtextxy(210,375,'V=a.b.c'); outtextxy(210,390,'P=2.(a.b+b.c+a.c)'); line(20,520,80,520); line(20,520,50,460); line(80,520,50,460); outtextxy(110,460,'Trojuholnik'); outtextxy(110,475,'S=a.Va/2'); outtextxy(110,490,'o=a+b+c'); line(40,560,140,560); line(20,620,160,620); line(40,560,20,620); line(140,560,160,620); outtextxy(190,560,'Lichobeznik'); outtextxy(190,575,'S=(a+c).Va/2'); outtextxy(190,590,'o=a+b+c+d'); outtextxy(500,20,'Eulerovo cislo'); outtextxy(510,35,'=2,718281828459045235360287471352...'); outtextxy(500,100,'Eulerova Mascheroniova konstanta'); outtextxy(510,115,'=0,57721 56649 01532 86060 65120 90082 40243...'); outtextxy(500,180,'Ludolfovo cislo'); outtextxy(510,195,'=3,141592653589 793238462643 383279502884...'); outtextxy(500,260,'Zlaty rez'); outtextxy(510,275,'=1,618034'); outtextxy(500,340,'Feigenbaumova konstanta delta'); outtextxy(510,355,'=4,66920160910299067185320382...'); outtextxy(500,420,'Feigenbaumova konstanta alfa'); outtextxy(510,435,'=2,502907875095892822283902873218...'); outtextxy(500,500,'Kaprekarova konstanta'); outtextxy(510,515,'=6174'); outtextxy(500,580,'Eulerova konstanta'); outtextxy(510,595,'=0,5772156649015328606065120900824024310...'); readln; end; 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); end.