Source Code
uses crt;
function kali(a,b:integer):longint;
begin
if b>1 then
begin
kali:= kali(a,b-1)+a;
end else
kali:=a;
end;
procedure LP_kubus;
var r,b:integer;
l:longint;
v:longint;
begin clrscr;
write('Sisi : ');
readln(r);
l:=6*r*r ;
v:=r*r*r ;
writeln;
writeln('Luas : ',l); readln;
writeln('Volume : ',v); readln;
end;
var pilih : char;
begin
repeat
clrscr;
writeln('============================');
writeln('= PROGRAM MENGHITUNG KUBUS =');
writeln('============================');
writeln(' [1] Luas dan Volume Kubus');
writeln(' [2] Keluar');
writeln;
write(' Pilih : ');
pilih:=readkey;
case pilih of
'1' : LP_kubus;
'2' : exit;
end;
until pilih = '3';
end.
Tidak ada komentar:
Posting Komentar