Output
FlowChart
BASIC
CLS
INPUT "Masukkan bilangan : ", Bil
Nilai = 1
Atas = Bil
Bawah = Bil - 1
FOR i = 1 TO Atas
FOR j = 1 TO i
PRINT Nilai;
Nilai = Nilai + 2
NEXT j
Nilai = 1
NEXT i
FOR i = Bawah TO 1 STEP -1
FOR j = 1 TO i
PRINT Nilai;
Nilai = Nilai + 2
NEXT j
Nilai = 1
NEXT i
Output
FlowChart
BASIC
CLS
INPUT "Masukkan bilangan : ", Bil
Nilai = Bil
Atas = Bil
Bawah = Bil - 1
FOR i = 1 TO Atas
FOR j = 1 TO i
PRINT Nilai;
Nilai = Nilai - 1
NEXT j
Nilai = Bil
NEXT i
FOR i = Bawah TO 1 STEP -1
FOR j = 1 TO i
PRINT Nilai;
Nilai = Nilai - 1
NEXT j
Nilai = Bil
NEXT i
0 Response to "Latihan BASIC"
Post a Comment