X-88

Delphi Goto

Apr 22nd, 2021 (edited)
206
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. program ZP;
  2.  
  3. {$APPTYPE CONSOLE}
  4.  
  5. uses
  6.   SysUtils, Crt;
  7.  
  8. var
  9.     Total, Gaji, Tunjangan: real;
  10.     Jumlahanak: integer;
  11.     Keterangan : string[25];
  12.     Y: char;
  13.  
  14. Label ulang;
  15.  
  16. Begin
  17.     Ulang:
  18.     clrscr();
  19.     textcolor($0a);
  20.     Write('Masukkan Gaji: ');
  21.     read(Gaji);
  22.     Write('Masukkan jumlah anak: ');
  23.     read(Jumlahanak);
  24.     Tunjangan := 0.25 * Gaji + Jumlahanak * 30000;
  25.     Total := Gaji + Tunjangan;
  26.     Keterangan := 'Karyawan Teladan';
  27.     Writeln('Gaji bulanan= Rp.', Gaji);
  28.     Writeln('Tunjangan = Rp. ', Tunjangan);
  29.     Writeln ('Total gaji = Rp. ', Total);
  30.     Writeln('Keterangan = ', Keterangan );
  31.     Write(' Mau menghitung lagi? [Y/T]', #10#13, '>>>');
  32.     Y := readkey;
  33. if (upcase(y) = 'Y') or (LowerCase(y) = 'y') then
  34.     goto ulang;
  35.     Readln;
  36. end.
RAW Paste Data