• Twitter
  • Technocrati
  • stumbleupon
  • flickr
  • digg
  • youtube
  • facebook

Follow our Network

Contoh Program Medium TPW bag. 11

0

Label:

Reaksi: 


-------------------------------------------------------------
Program Procedure_Berparameter;
Uses wincrt;
Procedure kali (a,b:integer);
Var
c:integer;
begin
c:=a*b;
writeln(' ');
writeln('Nilai C=',c);
writeln(' ');
writeln('Thank You...!!');
end;
var
x,y:integer;
begin
  write('Nilai X? ');readln(x);
  write('Nilai Y? ');readln(y);
  kali(x,y);
end.

--------------------------------------------------------------

Program Perhitungan_Persegi_Panjang;
Uses wincrt;
Procedure Keliling (a,b:integer);
Var
K:integer;
Begin
K:=2*(a+b);
writeln(' ');
writeln('================================');
Writeln('Keliling Persegi Panjang= ',K);
writeln('================================');
writeln(' ');
End;

Procedure Luas (a,b:integer);
Var
Ls:integer;
Begin
 Ls:=a*b;
writeln(' ');
writeln('-----------------------------');
Writeln('Luas Persegi Panjang= ',Ls);
writeln('-----------------------------');
writeln(' ');
End;

Var p,l,pil:integer;
Begin
   Write('Panjang= ');readln(p);
   Write('Lebar= ');readln(l);
Writeln('Anda Ingin Mencari: ');
Writeln('1.Keliling');
Writeln('2.Luas');
readln(pil);

Case pil of
1:Keliling (p,l);
2:Luas(p,l);
End;

End.

--------------------------------------------------------------
created by : MuchFa (Tio Muchtar)
NB: Anda boleh copas, tapi cantumkan Link dan penulisnya..!! Demi kenyamanan bersama..!! ^^

Comments (0)

Posting Komentar

Social Media

  • Subscribe via email

    Enter your email address:

    Delivered by FeedBurner

    Techno 4 U