Selasa, 06 Januari 2015

PENULISAN PROCEDURE & FUNCTION MODEL PROCEDURE BY REFERENCE

program Project13;
{$APPTYPE CONSOLE}
uses
  SysUtils;
var
    X,Y,Z:integer;
  procedure jumlah(var A,B,C:integer);
    begin
      C:= A+B;
    end;
begin
  writeln ('NIM  : 114224008');
  writeln ('NAMA : AZIZUN NURRACHMAN');
  writeln ('=====================================');
  writeln ('CONTOH PENULISAN PROCEDURE & FUNCTION');
  writeln ('    MODEL PROCEDURE BY REFERENCE     ');
  writeln ('=====================================');
  writeln ('');
  write('Masukkan Nilai X = ');readln(X);
  write('Masukkan Nilai Y = ');readln(Y);
  jumlah(X,Y,Z);
  writeln('X + Y = ', Z);
  readln;
  { TODO -oUser -cConsole Main : Insert code here }
end.




0 komentar:

Posting Komentar