turbo pascal program persegi

uses wincrt;
var
p,l,ls,k:real;
kb:char;
label awal;

begin
writeln;
awal: 
writeln(' program persegi panjang');
writeln('+++++++++++++++++++++++++++++');
write('masukkan panjang    : ');readln(p);
write('masukkan lebar      : ');readln(l);
ls:=p*l;
k:=2*(p+l);
writeln('luas tabungnya        : ',ls:2:1) ;
writeln('keliling lingkarannya : ',k:2:1) ;

writeln('=============================') ;
writeln('anda ingin lagi       : ');kb:=readkey;
if kb='y' then goto awal;
end.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 komentar:

Posting Komentar