uses
wincrt;
label
cornelia;
var
x,y,pil,pangkat,f:integer;
s,t:real;
jw:char;
begin
cornelia:
writeln('Nama
: Cornelia Revelina Sahetapy');
writeln('NIM
: 5720112129');
writeln;
writeln('Pilihan
Menu');
writeln('1.Penjumlahan');
writeln('2.Perkalian');
writeln('3.Pengurangan');
writeln('4.Pembagian');
writeln('5.Pangkat');
writeln('6.Akar
pangkat');
writeln('7.Selesai');
writeln;
write('Pilih
salah satu Menu[1-7];');readln(pil);
case
pil of
1:begin
writeln('Penjumlahan');
write('Masukan
Nilai x : ');readln(x);
write('Masukan
Nilai y : ');readln(y);
write('Nilai',x,'+',y,'=',x+y);
writeln;
write('Ingin
mencoba lagi?[y/t] : ');readln(jw);
if
(jw='Y') or (jw='Y') then goto cornelia;
end;
2:begin
writeln('Perkalian');
write('Masukan
Nilai x : ');readln(x);
write('Masukan
Nilai y : ');readln(y);
write('Nilai',x,'*',y,'=',x*y);
writeln;
write('Ingin
mencoba lagi?[y/t] : ');readln(jw);
if
(jw='Y') or (jw='Y') then goto cornelia;
end;
3:begin
writeln('Pengurangan');
write('Masukan
Nilai x : ');readln(x);
write('Masukan
Nilai y : ');readln(y);
write('Nilai',x,'-',y,'=',x-y);
writeln;
write('Ingin
mencoba lagi?[y/t] : ');readln(jw);
if
(jw='Y') or (jw='Y') then goto cornelia;
end;
4:begin
writeln('Pembagian');
write('Masukan
Nilai x : ');readln(s);
write('Masukan
Nilai y : ');readln(y);
write('Nilai',s,':',t,'=',s/t:6:1);
writeln;
write('Ingin
mencoba lagi?[y/t] : ');readln(jw);
if
(jw='Y') or (jw='Y') then goto cornelia;
end;
5:begin
writeln('Pangkat');
write('Masukan
Nilai x : ');readln(x);
write('Masukan
Nilai pangkat : ');readln(y);
pangkat:=2;
for
f:=2 to y do
begin
pangkat:=pangkat*x;
end;
writeln('Pangkat
',x,'^',y,'=',pangkat);
writeln;
write('Ingin
mencoba lagi?[y/t] : ');readln(jw);
if
(jw='Y') or (jw='Y') then goto cornelia;
end;
6:begin
writeln('Akar');
write('Masukan
Nilai Akar yg di inginkan');readln(s);
writeln('Akar
dari ',s:6:1,'=',sqrt(s):6:1);
writeln;
write('Ingin
mencoba lagi?[y/t] : ');readln(jw);
if
(jw='Y') or (jw='Y') then goto cornelia;
end;
7:begin
writeln;
writeln('S
E L E S A I');
writeln('See
You Later');
end;
else
writeln('Maaf
Pilihan anda tidak terbaca');
write('Ingin
mencoba lagi?[y/t] : ');readln(jw);
if
(jw='Y') or (jw='Y') then goto cornelia;
end;
end.