10 CLS
20 DIM LA(1 TO 6) AS INTEGER
30 FOR I = 1 TO 5
40 INPUT "ENTER THE VALUE: ", LA(I)
50 NEXT I
60 PRINT "YOU HAVE INSERTED THESE VALUES"
70 FOR M = 1 TO 5
80 PRINT LA(M)
90 NEXT M
100 INPUT "ENTER THE POSITION TO BE DELETED (FROM LINE 1 TO 5): ", LA(I)
110 LET N = 5
120 LET K = LA(I)
130 LET ITEM = LA(K)
140 FOR J = K TO (N - 1)
150 LET LA(J) = LA(J + 1)
160 NEXT J
170 N = N - 1
180 PRINT "ELEMENTS REMAINING AFTER A SUCCESSFUL DELETE"
190 FOR K = 1 TO N
200 PRINT LA(K)
210 NEXT K
220 LET N = LA(4)
230 C = LA(4) ^ 3
240 PRINT "THE CUBE OF LAST ELEMENT AFTER DELETION IS = "; C
250 END
PROGRAM RESULT
0 Comments
If you have further concerns, kindly drop a comment.