10 CLS
20 REM LINEAR SEARCH DEMO CODE
30 N = 10
40 DIM A(1 TO 11) AS INTEGER
50 FOR I = 1 TO N
    60 INPUT "ENTER A NUMBER: ", A(I)
70 NEXT I
80 INPUT "WHICH OF THE VALUES ENTERED DO YOU WANT TO SEARCH FOR ", ITEM
90 A(N + 1) = ITEM
100 LET LOC1 = 1
110 WHILE (A(LOC1) <> ITEM)
    120 LOC1 = LOC1 + 1
    130 IF (LOC1 > N) THEN
        140 PRINT "ITEM IS NOT IN THE ARRAY"
        150 GOTO 80
    160 END IF
170 WEND
180 PRINT "LOCATION OF ITEM IS AT ARRAY INDEX ", LOC1
190 LET LOC1 = LOC1 - 1
200 PRINT "THE NUMBER OF COMPARISONS BEFORE FINDING ITEM IS: ", LOC1
210 LET CUBE = LOC1 ^ 3
220 PRINT "THE CUBE OF THE NUMBER OF COMPARISONS IS ", CUBE

230 END
PROGRAM RESULT