Listing Turbo Basic Warung Telephone (WARTEL)
REM TOPIK PEMBAHASAN : WARTEL
REM ANGGOTA :
REM 1. ENDANG HIDAYAT (123010075)
SUB MASUKKAN
shared i ,KOPA%(),JENSA$(),trf&(),J1!(),M1!(),D1!(),J2!(),M2!(),D2!(),LABI%(),TOBI&(),GT&()
GT&=0
DO
i=i+1
CLS
? "+====================================+
? "| JENIS PANGGILAN |"
? "+====================================+"
? "| 1 | LOKAL | RP. 100 / menit |"
? "| 2 | INTERLOKAL | Rp. 1000 / menit |"
? "+====================================+
?
INPUT "KODE PANGGILAN (1..2) : ",KOPA%(i)
IF KOPA%(i)=1 then
JENSA$(i)="LOKAL"
trf&(i)=100
elseif KOPA%(i)=2 then
JENSA$(i)="INTERLOKAL"
trf&(i)=1000
end if
? "WAKTU MULAI = : : "
locate 9,25
input "",J1!(i)
locate 9,28
input "",M1!(i)
locate 9,31
input "",D1!(i)
? "WAKTU SELESAI = : : "
locate 10,25
input "",J2!(i)
locate 10,28
input "",M2!(i)
locate 10,31
input "",D2!(i)
INPUT "LAKUKAN PANGGILAN LAGI ? (Y/T)= ",JWB$
LOOP UNTIL UCASE$(JWB$)="T"
END SUB
CLS
SUB CETAK
shared i ,KOPA%(),JENSA$(),trf&(),J1!(),M1!(),D1!(),J2!(),M2!(),D2!(),LABI%(),TOBI&(),PEM&(),KEM&(),GT&()
for a= 1 to i
?,a
PRINT "===========================================================+
PRINT " WARTEL DOREMI
PRINT " JL. GEGER KALONG TENGAH NOMOR 27 BANDUNG UTARA
PRINT " TELP.(022) 8787878 FAX.(022) 8989889
PRINT "+==========================================================+
PRINT USING " JENIS SAMBUNGAN : \ \ ";JENSA$(a)
PRINT "+----------------------------------------------------------+
PRINT " WAKTU MULAI : ";J1(a)":"M1(a)":"D1(a)
PRINT " WAKTU SELESAI : ";J2(a)":"M2(a)":"D2(a)
LABI%(a)=((J2!(a)-J1!(a))*60)+((M2!(a)-M1!(a))*1)+((D2!(a)-D1!(a))/60)
PRINT USING " LAMA BICARA : ### menit";LABI%(a)
PRINT "+----------------------------------------------------------+
TOBI&(a)=LABI%(a)*trf&(a)
PRINT USING " TOTAL BIAYA : Rp #,###,###.## ";TOBI&(a)
INPUT " PEMBAYARAN : Rp ",PEM&(a)
PRINT "+----------------------------------------------------------+
KEM&(a)=PEM&(a)-TOBI&(a)
PRINT USING " KEMBALIAN : Rp #,###,###.## ";KEM&(a)
PRINT "+==========================================================+
PRINT " TERIMAKASIH"
PRINT "+==========================================================+
input " Tekan Enter",i
cls
GT&=GT&+TOBI&(a)
NEXT a
? "Terima Kasih"
? "Total Pemasukan di WARTEL DOREMI sebesar Rp";GT&
input ,i
END SUB
SUB MENU
CLS
?"----------------------
?"| No | Keterangan |
?"----------------------
?"| 1 | MASUKKAN |
?"| 2 | CETAK |
?"| 3 | EXIT |
?"----------------------
input "Masukkan Kode Keterangan :",kd%
if kd%=1 then
call MASUKKAN
elseif kd%=2 then
CLS
call CETAK
else
end
end if
call MENU
end sub
call MENU
No comments:
Post a Comment