Jumat, 27 November 2009

Koding program cobol 'Membuat menu'

identification division.
program-id. menu.
author. taufik.
environment division.
data division.
working storage section.
77 PILIHAN pic 9(3).
77 pil pic 9(1).
77 pil pic a(15).
01 kondisi PIC X.
88 YA VALUE 'Y', 'y'.
88 TIDAK VALUE 'T', 't'.
01 layout.
01 abc pic x(6).
screen section.
01 hapus-layar.
02 blank screen.
procedure division.
mulai.
display hapus-layar.
display (3, 25) '<>'.
display (5, 25) '1.makan pagi'.
display (5, 25) '2.makan siang'.
display (7, 25) '3.makan malam'.
display (8, 25) '4.selesai'.
display (10, 25) 'pilihan anda [1..4] :'.
accept PILIHAN .
go to 1, 2, 3, 4 depending of PILIHAN.
1.
display hapus-layar.
display (3, 25) '<>'.
display (5, 25) '1. nasi goreng'.
display (6, 25) '2. bubur ayam'.
accept abc.
perform pesan.
2.
display hapus-layar.
display (3, 25) '<>'.
display (5, 25) '1. soto ayam'.
display (6, 25) '2. gado-gado'.
accept abc.
perform pesan.
3.
display hapus-layar.
display (3, 25) '<>'.
display (5, 25) '1.pizza'.
display (6, 25) '2.steak'.
accept abc.
perform pesan.
4. stop run.
pesan.
display hapus-layar.
display (12, 25) 'anda yakin sebelum data di cetak [Y/T]:'.
accept kondisi.
IF YA
GO TO salam.
IF TIDAK
GO TO mulai.
salam.
display hapus-layar.
display (14,20) 'terima kasih'.
stop run.

catatan : jangan lupa dimulai dari kolom 8
About The Author
Bie, that's my name. Im just an ordinary blogger.Ea eam labores imperdiet, apeirian democritum ei nam, doming neglegentur ad vis. Ne malorum ceteros feugait quo, ius ea liber offendit placerat, est habemus aliquyam legendos id. Eam no corpora maluisset definitiones.
Share This
Subscribe Here

1 komentar:

Akyura - kun on 27 November 2009 pukul 21.46 mengatakan...

loh?
kok jadi berantakan???

Posting Komentar

 

Site Info

Akyura Stratos Copyright © 2009 DarkfolioZ is Designed by Bie Blogger Template for Ipietoon
In Collaboration With fifa