Rabu, 21 November 2012
Contoh Program Qbasic
Program Untuk Menginput dan Mencetak
CLS
DIM P AS INTEGER
10 PRINT "menu"
PRINT "1. Input nama"
PRINT "2. Input NPM"
PRINT "3. Input Kelas"
PRINT "4. Cetak Semua"
PRINT "5. Exit"
INPUT "Pilihan menu?", P
SELECT CASE P
CASE 1
CLS
DIM NM AS STRING
INPUT "Nama:", NM
GOSUB 10
CASE 2
CLS
DIM NPM AS LONG
INPUT "NPM:", NPM
GOSUB 10
CASE 3
CLS
DIM KLS AS STRING
INPUT "Kelas:", KLS
GOSUB 10
CASE 4
CLS
PRINT "Nama:"; NM
PRINT "NPM:"; NPM
PRINT "Kelas:"; KLS
GOSUB 10
CASE 5
CLS
PRINT "see you next time "
END SELECT
END
Langganan:
Posting Komentar (Atom)
0 comments:
Posting Komentar