Home / Tugas Kuliah / (Turbo Basic) Tugas 5 PROGRAM PERULANGAN INPUT DO WHILE

(Turbo Basic) Tugas 5 PROGRAM PERULANGAN INPUT DO WHILE

tampilan-program-turbo-basic

REM PROGRAM PERULANGAN INPUT DO WHILE
REM WRITE BY AINI SASTRA
cls
input “Berapa Jumlah Beli =”,n
gt=0
for lagi=1 to n
input “Masukkan Nama Barang =”,nm$(lagi)
input “Masukkan Harga Barang =”,hrg(lagi)
input “Masukkan Jumlah Barang =”,jum(lagi)
tot(lagi)=hrg(lagi)*jum(lagi)
print “total bayar =”;using “Rp ###,###,###”;tot(lagi)
input,A$
gt=gt+tot(lagi)
next
print”======================================”
print “Jumlah Total =”;using “Rp ###,###,###” ;gt
?:?a=1
WHILE a<=n

? “Nama Barang Ke “;a;” =”;nm$(a)

? “Harga Barang Ke “;a;” =”;hrg(a)

? “Jumlah Barang Ke “;a;” =”;jum(a)

? “Total Bayar ke “;a;” =”;using “Rp ###,###,###” ;tot(a)

?

a=a+1

WEND

? “========================================”

? “Jumlah Total “” =”;using “Rp ###,###,###” ;gt

locate 25,53:? “Created By Aini Sastra”

END

 

About Admin