SELAMAT DATANG DI BLOG HUSNY ARIFUDDIN

Minggu, 09 Januari 2011

Contoh Program QBasic


Program Membuat Segitiga

CLS
Klm = 40: brs = 2
FOR I = 1 TO 10
FOR j = 1 TO i
LOCATE brs, klm
   PRINT j;
Klm = klm + 2
   NEXT j
Klm = 40
Brs = brs + 1
Klm = klm – i
PRINT
NEXT i
END


Program Membuat ARRAY

CLS
FOR I = 5 TO 1 STEP -1
FOR j = 1 TO i
PRINT j * 5;
NEXT j
PRINT
NEXT i
END

Tidak ada komentar:

Posting Komentar