program luas keliling lingkaran

program luas_keliling_lungkaran;
uses wincrt;
label ulang;

var
r:integer;
l:real;
k:real;
ab:char;
const
phi=3.14;

begin
ulang:
clrscr;

writeln('PROGRAM MENCARI LUAS DAN KELILING LINGKARAN');

write('jari-jari= ');readln(r);
l:=phi*r*r;
k:=2*phi*r;
writeln('luas lingkaran= ',l:4:2);
write('keliling lingkaran= ',k:4:2);
writeln('Apakah anda ingin mengulanginya (y/t): ');
readln(ab);
if (ab='y') or (ab='Y') then
begin
goto ulang;
end
else
donewincrt;
readln
end.

Categories:

0 comments:

Post a Comment