Thursday, January 17, 2013
membuat program score di xbase
CLEAR
@ 1,0 TO 23,79
@ 2,10 TO 22,10
I = 14
DO WHILE I < 77
@ 3,I TO 22,I
I = I+4
ENDDO
I = 3
DO WHILE I< 23
@ I,1 TO I,78
I = I + 2
ENDDO
@ 22,1 SAY "Total"
@ 2,75 SAY "Tot"
@ 2,3 SAY "SISWA"
I = 1
X = 12
DO WHILE I < 17
@ 2,X SAY LTRIM(STR(I))
I = I + 1
X = X + 4
ENDDO
I = 4
DO WHILE I < 21
cNama = SPACE(9)
@ I,1 GET cNama PICT "!!!!!!!!!!"
READ
I = I + 2
ENDDO
I = 1
Y = 12
STORE 0 TO nT1,nT2,nT3,nT4,nT5,nT6,nT7,nT8,nT9
DO WHILE Y < 75
X = 4
nJum = 0
DO WHILE X < 21
cNil = "0"
@ X,Y GET cNil
READ
IF cNil = "1" THEN
nJum = nJum + 1
DO CASE
CASE X = 4
nT1 = nT1 + 1
CASE X = 6
nT2 = nT2 + 1
CASE X = 8
nT3 = nT3 + 1
CASE X = 10
nT4 = nT4 + 1
CASE X = 12
nT5 = nT5 + 1
CASE X = 14
nT6 = nT6 + 1
CASE X = 16
nT7 = nT7 + 1
CASE X = 18
nT8 = nT8 + 1
CASE X = 20
nT9 = nT9 + 1
ENDCASE
ENDIF
X = X + 2
ENDDO
@ X,Y SAY LTRIM(STR(nJum))
Y = Y + 4
ENDDO
@ 4,76 SAY LTRIM(STR(nT1))
@ 6,76 SAY LTRIM(STR(nT2))
@ 8,76 SAY LTRIM(STR(nT3))
@ 10,76 SAY LTRIM(STR(nT4))
@ 12,76 SAY LTRIM(STR(nT5))
@ 14,76 SAY LTRIM(STR(nT6))
@ 16,76 SAY LTRIM(STR(nT7))
@ 18,76 SAY LTRIM(STR(nT8))
@ 20,76 SAY LTRIM(STR(nT9))
READ
Labels:
programing
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment