90 CLS
DIM a AS INTEGER
PRINT TAB(2); "----------- MENU ------------"
PRINT
PRINT TAB(2); "1. Program Biodata"
PRINT TAB(2); "2. Program Pengulangan"
PRINT TAB(2); "3. Exit"
PRINT
PRINT TAB(2); "-----------------------------"
PRINT
PRINT TAB(2); "-----------------------------"
LOCATE 8, 2
INPUT "Masukan pilihan : ", a
SELECT CASE a
CASE 1
100 CLS
PRINT TAB(2); "Program Biodata"
PRINT
LOCATE , 2
INPUT "Masukan Nama : ", nama$
LOCATE , 2
INPUT "Masukan Kelas : ", kelas$
LOCATE , 2
INPUT "Masukan NPM : ", npm$
CLS
PRINT TAB(2); "Hasil Program"
PRINT
PRINT TAB(2); "Nama : "; nama$
PRINT TAB(2); "Kelas : "; kelas$
PRINT TAB(2); "NPM : "; npm$
PRINT
PRINT
INPUT "Anda mengulang program ini kembali (y/n) : ", z$
IF z$ = "Y" OR z$ = "y" THEN 100
PRINT
PRINT
INPUT "Anda ingin kembali ke MENU (y/n) : ", b$
IF b$ = "Y" OR b$ = "y" THEN 90
CASE 2
50 CLS
DIM a AS INTEGER
PRINT TAB(2); "----------- MENU ------------"
PRINT TAB(2); "1. Program Biodata"
PRINT TAB(2); "2. Program Pengulangan"
PRINT TAB(2); "3. Exit"
PRINT TAB(2); "-----------------------------"
PRINT TAB(2); "-----------------------------"
LOCATE 8, 2
INPUT "Masukan pilihan : ", a
SELECT CASE a
CASE 1
100 CLS
PRINT TAB(2); "Program Biodata"
LOCATE , 2
INPUT "Masukan Nama : ", nama$
LOCATE , 2
INPUT "Masukan Kelas : ", kelas$
LOCATE , 2
INPUT "Masukan NPM : ", npm$
CLS
PRINT TAB(2); "Hasil Program"
PRINT TAB(2); "Nama : "; nama$
PRINT TAB(2); "Kelas : "; kelas$
PRINT TAB(2); "NPM : "; npm$
INPUT "Anda mengulang program ini kembali (y/n) : ", z$
IF z$ = "Y" OR z$ = "y" THEN 100
INPUT "Anda ingin kembali ke MENU (y/n) : ", b$
IF b$ = "Y" OR b$ = "y" THEN 90
CASE 2
50 CLS
DIM v AS INTEGER
PRINT TAB(2); "Program Pengulangan"
PRINT TAB(2); "-----------------------------"
PRINT
PRINT TAB(2); "1. Program FOR-NEXT"
PRINT TAB(2); "2. Program DO UNTIL"
PRINT TAB(2); "3. Program DO while"
PRINT TAB(2); "4. BACK TO MAIN MENU"
PRINT
PRINT TAB(2); "-----------------------------"
PRINT
PRINT TAB(2); "-----------------------------"
LOCATE 10, 2
INPUT "Masukan pilihan : ", v%
SELECT CASE v%
CASE 1
2 CLS
PRINT "Program FOR - NEXT"
PRINT "------------------"
PRINT
INPUT "Masukan Angka : ", b%
PRINT
FOR n = 1 TO b%
FOR m = 1 TO n
PRINT " "; "*";
NEXT m
PRINT
NEXT n
PRINT
PRINT
INPUT "Anda ingin mengulang PROGRAM ini (y/n) : ", cobu$
IF cobu$ = "Y" OR cobu$ = "y" THEN 2
20 PRINT
INPUT "Anda ingin Kembali Ke menu Proram Pengulangan (y/n) : ", cobu$
IF cobu$ = "Y" OR cobu$ = "y" THEN 50
END
CASE 2
3 CLS
PRINT "Program Do Until"
PRINT "----------------"
PRINT
INPUT "Masukan Angka : ", z%
PRINT
DO
LET z% = z% * 2
PRINT z%;
LOOP UNTIL z% >= 100
PRINT
PRINT
INPUT "Anda ingin mengulang PROGRAM ini (y/n) : ", cobe$
IF cobe$ = "Y" OR cobe$ = "y" THEN 3
GOTO 20
CASE 3
4 CLS
PRINT "Proram Do While"
PRINT "---------------"
PRINT
INPUT "Masukan Angka : ", x%
PRINT
DO WHILE x% >= 1
x% = x% - 1
PRINT x%;
LOOP
PRINT
PRINT
INPUT "Anda ingin mengulang PROGRAM ini (y/n) : ", cobo$
IF cobo$ = "Y" OR cobo$ = "y" THEN 4
GOTO 20
CASE 4
GOTO 90
CASE ELSE
GOTO 50
END SELECT
CASE 3
CLS
PRINT "SAYONARA"
END
CASE ELSE
GOTO 90
END SELECT
0 komentar:
Posting Komentar