Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program p1;
- uses crt;
- const pi=3.14;
- var s,g,a,b,c,h,r:integer;
- w,p,o:real;
- l:char;
- label poczatek_programu,kalkulator,pola,obwody;
- begin
- poczatek_programu:
- clrscr;
- textcolor(white);
- writeln(' ---------------------------------------------');
- writeln(' / \');
- writeln(' / \');
- textcolor(yellow);
- writeln(' Obliczeniowy Mordor ');
- textcolor(white);
- writeln(' \ /');
- writeln(' \ /');
- writeln(' ---------------------------------------------');
- textcolor(red);
- writeln;
- writeln(' Wybierz funkcje programu');
- writeln;
- writeln(' 1.Kalkulator');
- writeln;
- writeln(' 2.Obliczanie pola');
- writeln;
- writeln(' 3.Obliczanie obwodu');
- writeln;
- textcolor(white);
- writeln(' ---------------------------------------------');
- writeln(' Made by Franciszek Górny');
- readln(s);
- clrscr;
- case s of
- 1:begin
- kalkulator:
- clrscr;
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln;
- writeln(' Wybierz rodzaj dzialania');
- writeln;
- writeln(' 1.Mnozenie');
- writeln;
- writeln(' 2.Dzielenie');
- writeln;
- writeln(' 3.Dzielenie pierwiastka');
- writeln;
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- readln(g);
- if g=1 then
- begin
- clrscr;
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Podaj dwie liczby');
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- readln(a,b);
- clrscr;
- w:=a*b;
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Wynik dzialania wynosi',w:6:2);
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- end
- else begin
- clrscr;
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Nie ma dzialania przypisanego do tej liczby');
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- end;
- if g=2 then
- begin
- clrscr;
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Podaj dwie liczby');
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- readln(a,b);
- clrscr;
- if b>0 then
- begin
- w:=a/b;
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Wynik dzialania wynosi',w:6:2);
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- end
- else
- begin
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Podano zle liczby');
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- end;
- end;
- if g=3 then
- begin
- clrscr;
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Podaj pierwiastek i dzielnik');
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- readln(a,b);
- clrscr;
- if b>0 then
- begin
- w:=sqrt(a)/b;
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Wynik dzialania wynosi',w:6:2);
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- end
- else
- begin
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Podano zle liczby');
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- end;
- end;
- end;
- 2:begin
- pola:
- clrscr;
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln;
- writeln(' Wybierz pole ktore chcesz obliczyc');
- writeln;
- writeln(' 1.Pole prostokata');
- writeln;
- writeln(' 2.Pole kola');
- writeln;
- writeln(' 3.Pole trojkata');
- writeln;
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- readln(g);
- if g=1 then
- begin
- clrscr;
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Podaj rozmiary bokow');
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- readln(a,b);
- clrscr;
- if (a>0) and (b>0) then
- begin
- p:=a*b;
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Pole jest rowne',p:6:2);
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- end
- else
- begin
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Podano zle liczby');
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- end;
- end
- else
- begin
- clrscr;
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Nie ma dzialania przypisanego do tej liczby');
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- end;
- if g=2 then
- begin
- clrscr;
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Podaj promien');
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- readln(r);
- clrscr;
- if r>0 then
- begin
- p:=sqr(pi*r);
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Pole jest rowne',p:6:2);
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- end
- else
- begin
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Podano zle liczby');
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- end;
- end;
- if g=3 then
- begin
- clrscr;
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Podaj bok i wysokosc');
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- readln(a,h);
- clrscr;
- if (a>0) and (h>0) then
- begin
- p:=(a*h)/2;
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Pole jest rowne',p:6:2);
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- end
- else
- begin
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Podano zle liczby');
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- end;
- end;
- end;
- 3:begin
- obwody:
- clrscr;
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln;
- writeln(' Wybierz obwod ktory chcesz obliczyc');
- writeln;
- writeln(' 1.Obwod prostokata');
- writeln;
- writeln(' 2.Obwod kola');
- writeln;
- writeln(' 3.Obwod trojkata');
- writeln;
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- readln(g);
- if g=1 then
- begin
- clrscr;
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Podaj rozmiary bokow');
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- readln(a,b);
- clrscr;
- if (a>0) and (b>0) then
- begin
- p:=(a+b)*2;
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Obwod jest rowny',p:6:2);
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- end
- else
- begin
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Podano zle liczby');
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- end;
- end
- else
- begin
- clrscr;
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Nie ma dzialania przypisanego do tej liczby');
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- end;
- if g=2 then
- begin
- clrscr;
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Podaj promien');
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- readln(r);
- clrscr;
- if r>0 then
- begin
- p:=(pi*r)*2;
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Obwod jest rowny',p:6:2);
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- end
- else
- begin
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Podano zle liczby');
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- end;
- end;
- if g=3 then
- begin
- clrscr;
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Podaj trzy boki');
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- readln(a,b,c);
- clrscr;
- if (a>0) and (b>0) and(c>0) then
- begin
- p:=a+b+c;
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Obwod jest rowny',p:6:2);
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- end
- else
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Podano zle liczby');
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- end;
- end
- else
- begin
- textcolor(white);
- writeln(' --------------------------------------------');
- textcolor(red);
- writeln(' Nie ma takiej funkcji');
- textcolor(white);
- writeln(' --------------------------------------------');
- writeln;
- writeln(' Szybka podroz');
- writeln;
- writeln(' P=Pola O=Obwody M=menu początkowe');
- writeln;
- writeln(' K=Kalkulator E= wydz z programu');
- l:=readkey;
- if l='p' then goto pola;
- if l='o' then goto obwody;
- if l='m' then goto poczatek_programu;
- if l='k' then goto kalkulator;
- if l='e' then exit;
- end;
- end;
- readkey;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement