} - See more at: http://www.seoterpadu.com/2013/06/cara-mengganti-background-blog.html#sthash.hxMWDKOg.dpuf
Home » » Procedure & function (Procedure By Value)

Procedure & function (Procedure By Value)

Procedure & function (Procedure By Value)

langsung saja liat contoh dari Procedure By Value , seperti gambar dibawah ini


Script :

program Pf_byValue;
{$APPTYPE CONSOLE}
uses
  SysUtils;
var
    X,Y:integer;
  procedure jumlah(A,B:integer) ;
    var
      C:integer;
    begin
      C:= A+B;
      writeln('Hasil Penjumlahan = ',C);
    end;
begin
  writeln;
  writeln('Nama : Maisirotul Rizka');
  writeln('Nim  : 114224022');
  writeln('--------------------------');
  writeln;
  writeln ('=====================================');
  writeln ('CONTOH PENULISAN PROCEDURE & FUNCTION');
  writeln ('       MODELPROCEDURE BY VALUE       ');
  writeln ('=====================================');
  writeln ('');
  write('Masukkan Nilai X  = '); readln(X);
  write('Masukkan Nilai Y  = '); readln(Y);
  writeln;
  jumlah(X,Y);
  readln;
  { TODO -oUser -cConsole Main : Insert code here }
end.

selamat mencoba ^^

0 komentar:

Posting Komentar

 
Support : Your Link | Your Link | Your Link
Copyright © 2013. M Blog - All Rights Reserved
KreasiKu Maisi Published by Maisi
Proudly powered by Blogger