DAFTAR GAJI PEGAWAI
NAMA TOTAL GAJI
----------------------------------
INA 1500000
ANI 1300000
NIA 1250000
ANE 1000000
ANU 7500000
Dengan variable subskrib nama, gapok, tunjangan diinput dengan looping menggunakan teknik kounter.
Total gaji diperoleh dari gapok ditambah tunjangan.
DIM NAMA$(5), GAPOK (5), TUNJ(5), TOTALGAJI(5)
K= 1
10 INPUT “NAMA = “, NAMA$(K)
INPUT “GAJI POKOK = “,GAPOK(K)
INPUT “TUNJANGAN = “,TUNJ(K)
TOTALGAJI(K) = GAPOK(K) + TUNJ(K)
IF K=5 THEN 20
K = K + 1
GOTO 10
20 PRINT “DAFTAR GAJI PEGAWAI”
PRINT
PRINT “ NAMA”;TAB(15);”TOTAL GAJI”
PRINT “-----------------------------------“
FOR K = 1 TO 5
K= 1
10 INPUT “NAMA = “, NAMA$(K)
INPUT “GAJI POKOK = “,GAPOK(K)
INPUT “TUNJANGAN = “,TUNJ(K)
TOTALGAJI(K) = GAPOK(K) + TUNJ(K)
IF K=5 THEN 20
K = K + 1
GOTO 10
20 PRINT “DAFTAR GAJI PEGAWAI”
PRINT “ NAMA”;TAB(15);”TOTAL GAJI”
PRINT “-----------------------------------“
FOR K = 1 TO 5
PRINT NAMA$(K);TAB(15);TOTALGAJI(K)
NEXT K
END
NEXT K
END
Hasil Aoutput
Sekian info dari saya semoga bermanfaat :)
0 comments:
Posting Komentar