Advertisement
rayhanf

trf_byReference2

Mar 17th, 2023
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.23 KB | Source Code | 0 0
  1. program contoh2;
  2. uses crt;
  3.  
  4. procedure tukar(var x, y: integer);
  5. var z: integer;
  6. begin
  7.     z:=x;
  8.     x:=y;
  9.     y:=z;
  10. end;
  11.  
  12. var a, b: integer;
  13. begin
  14.     clrscr;
  15.     a := 2;
  16.     b := 9;
  17.     tukar(a,b);
  18.     writeln('a=', a, ' b=', b);
  19.     readkey;
  20. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement