Tuesday, May 3, 2011

Program Menukar Nilai1

Program Menukar_Nilai1;
Uses WinCrt;
var A,B:integer;
Begin
  Writeln('Program Menukar Nilai A Menjadi B');
  Writeln('=================================');
  Writeln;
  Write('Masukkan Nilai A: ');readln(A);
Write('Masukkan Nilai B: ');readln(B);
  Writeln;
  A:=A-B;
  B:=B+A;
  A:=B-A;
  Writeln;
  Writeln('Hasil A=',A,' B=',B);
End.
Outputnya:

0 comments:

Post a Comment