Cara membuat kolom dan tabel tanpa input data di QBasic


Buka Aplikasi QBasic anda
masukkan sintak


CLS
DATA YULI, BUSTAMI, PUTRI,SYAHRUL,AULIA,HAJIR
DATA 1214030001, 1214030002, 1214030003, 1214030004, 1214030005, 1214030006
DATA 76,54,87,64,73,67
REM DATA A,D,B,E,E,C

FOR I = 1 TO 6
  READ NAMA$(I)
  PRINT NAMA$(I)
NEXT I

FOR I = 1 TO 6
  READ NPM#(I)
  PRINT NPM#(I)
NEXT I

FOR I = 1 TO 6
  READ NILAI(I)
  PRINT USING "#######"; NILAI(I)
NEXT I

REM FOR I = 1 TO 6
REM  READ NHURUF$(I)
REM  PRINT NHURUF$(I)
REM NEXT I

PRINT "===================================================="
PRINT " NO    NAMA          NPM        NILAI      N. HURUF"
PRINT "===================================================="
FOR I = 1 TO 6
  IF NILAI(I) >= 0 THEN NHURUF$ = "E"
  IF NILAI(I) >= 55 THEN NHURUF$ = "D"
  IF NILAI(I) >= 65 THEN NHURUF$ = "C"
  IF NILAI(I) >= 75 THEN NHURUF$ = "B"
  IF NILAI(I) >= 85 THEN NHURUF$ = "A"


  PRINT USING "##     \      \ ###########    ###          \    \"; I; NAMA$(I); NPM#(I); NILAI(I); NHURUF$
NEXT I
PRINT "===================================================="
PRINT "KETERANGAN"
PRINT "A >= 85"
PRINT "B >= 75"
PRINT "C >= 65"
PRINT "D >= 55"
PRINT "E < 55"
END



1 komentar:

COBA HASIL RUN PROGRAMNYA DI PERLIHATKAN.


EmoticonEmoticon