Bassic Programming Dengan Qbassic

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Bassic Programming Dengan Qbassic as PDF for free.

More details

  • Words: 278
  • Pages: 2
NAMA : Kriswantoro KELAS :TI 1204 KAMPUS : LP3I Sumber Arta Cls Dim kd as string Dim obt as string Dim harga as string Dim bonus as string Dim discon as long PRINT “TOKO OBAT SELALU” INPUT “masukkan kode obat :”, kd IF kd = “A” THEN KASUS Obat = “Antangin” Hrg = 1000 Sebuah Apotik mempunyai data sebagai berikut: IF kd = “A” THEN Bonus = “Kotak Obat” KODE BARANG NAMA BARANG HARGA BARANG ELSE A Antangin 1000 Bonus = “Kotak Obat” END IF B Decolgen 1500 C Bodrex 2000 ELSE IF kd = “B” THEN Penjualan kepada customer setiap harinya dalam partai besar dimana Obat = “Decolgen” customer yg membeli obat antangin dan jumlah belinya lebih dr 10 unit Hrg = 1500 maka akan mendapatkan bonus berupa kotak obat. Sedangkan untuk Else Obat = “Bodrex” discon diberikan sebesar 10% dari total penjualan apabila jumlah lebih Hrg = 2000 dr 15, adapun layout yg diminta adalah sbb; END IF oooOOO Toko Obat Selalu OOOooo PRINT “Nama Obat :”, Obt PRINT “Harga Jual :”, Hrg Masukkan Kode Obat :A PRINT “Jumlah Beli :”, Jb Nama Obat :Antangin Tb = Jb * Hrg Harga Jual :Rp, 1000 IF Jb >15 THEN Jumlah Beli :20 Discon = 10/100 * Tb Bonus :Kotak Obat ELSE Total Biaya :Rp, 20000 Discon = 0 Discon :Rp, 2000 END IF ________________________________Total Bayar :Rp, 18000 Total Bayar = Tb-Discon MATUR NUWON PRINT “Bonus :”, Bonus PRINT “Total Biaya :”, Tb PRINT “Discon :”, Discon PRINT “_____________________PRINT “Total Biaya :”, Total bayar PRINT “______________________” PRINT “MATUR NUWON” PRINT “ NAMA = KRISWANTORO” PRINT “ KELAS = TI 1204 PRINT “ KAMPUS = LP3I Sumber Arta Kalimalang-Bekasi

Related Documents