albertoanggi

COBOL - PERTEMUAN 1

Oct 9th, 2017
614
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.        IDENTIFICATION DIVISION.
  2.        PROGRAM-ID. ANGGI ALBERTO.
  3.        ENVIRONMENT DIVISION.
  4.        DATA DIVISION.
  5.        WORKING-STORAGE SECTION.
  6.            01 NAMA PIC X(30).
  7.            01 NPM PIC X(8)
  8.            01 KELAS PIC X(5).
  9.        01 LINGKARAN.
  10.            02 JARI PIC 99V99.
  11.            02 LLINGKARAN PIC 99999V99.
  12.        01 HASIL.
  13.            02 OHASIL PIC ZZZZZ.99.
  14.  
  15.        SCREEN SECTION.
  16.        01 HAPUS-LAYAR.
  17.            02 BLANK SCREEN.        
  18.        PROCEDURE DIVISION.
  19.        MULAI.
  20.            DISPLAY (2,3) "NAMA   : ".
  21.            ACCEPT NAMA.
  22.            DISPLAY (3,3) "NPM    : ".
  23.            ACCEPT NPM.
  24.            DISPLAY (4,3) "KELAS  : ".
  25.            ACCEPT KELAS.
  26.        LINGKARAN.
  27.            DISPLAY HAPUS-LAYAR.
  28.            DISPLAY BDATA.
  29.            DISPLAY (5,20) 'NAMA  :', NAMA.
  30.            DISPLAY (6,20) 'KELAS :', KELAS.
  31.            DISPLAY (7,20) 'NPM   :', NPM.
  32.            DISPLAY (9, 10)'===MENGHITUNG LUAS LINGKARAN==='.
  33.            DISPLAY (10, 13) 'JARI-JARI : '.
  34.            ACCEPT JARI.
  35.            COMPUTE LLINGKARAN = 3.14 * JARI * JARI.
  36.            MOVE LLINGKARAN TO OHASIL.
  37.            DISPLAY (13, 15) 'LUAS LINGKARAN = '.
  38.            DISPLAY (13, 30) OHASIL.
  39.            DISPLAY (20, 12) ' '.
  40.        SELESAI.
  41.            STOP RUN.
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×