Postingan

Menampilkan postingan dari Januari, 2015

koding membuat program gaji pegawai lewat qbasic

Gambar
Koding untuk mencari gaji pegawai yang di tentukan dan outputnya seperti ini CLS DIM A(10, 10) DIM PS(10) DIM KU(10) DIM PM(10) FOR B = 1 TO 10 INPUT "Nama :"; A$(B, 1) INPUT "No.Peg :"; A$(B, 2) C = ASC(MID$(A$(B, 2), 1, 1)) A(B, 9) = VAL(MID$(A$(B, 2), 2, 1)) E = VAL(MID$(A$(B, 2), 3, 3)) DATA 1, 1500000 DATA 2, 2000000 DATA 3, 2500000 DATA 75,"keuangan" DATA 80,"personalia" DATA 77,"pemasaran" DATA 107,"keuangan" DATA 112, "personalia" DATA 109, "pemasaran" RESTORE WHILE A(B, 9) <> A(B, 3) READ A(B, 3), A(B, 4) A(B, 5) = 10 * A(B, 4) / 100 A(B, 6) = A(B, 5) + A(B, 4) WEND WHILE C <> F READ F, A$(B, 7) A(B, 8) = E WEND NEXT B TotTJ = A(1, 5) + A(2, 5) + A(3, 5) + A(4, 5) + A(5, 5) + A(6, 5) + A(7, 5) + A(8, 5) + A(9, 5) + A(10, 5) TotGPK = A(1, 4) + A(2, 4) + A(3, 4) + A(4, 4) + A(5, 4) + A(6, 4) + A(7, 4) + A(8, 4) + A(9, 4) + A(10, 4) FOR GP1 = 1 TO 10