CLS
DIM la(1 TO 5) AS INTEGER
FOR i = 1 TO 3
INPUT "enter the value ", la(i)
NEXT i
PRINT "array elements before insertion"
FOR j = 1 TO 3
PRINT la(j);
NEXT j
LET j = 3
LET k = 2
item = 5
WHILE (j >= k)
la(j + 1) = la(j)
j = j - 1
WEND
la(k) = item
n = n + 1
PRINT "array elements after insertion"
FOR k = 1 TO 4
PRINT la(k);
NEXT k
END
PROGRAM RESULT
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3pnYjuTsovEftLGOopJz0ly1KBVfT11Bu3Xl1Uhj47Lz2ahG2u_vxWtqkXUweelS5M1noGTmldVV3H-V4eVyAdN7HCGgHaQqX18XN93Vu5GgFa4VeFXJavnf7FDT-9wx8UKZ-xPK4tSM/s400/1.png)
DIM la(1 TO 5) AS INTEGER
FOR i = 1 TO 3
INPUT "enter the value ", la(i)
NEXT i
PRINT "array elements before insertion"
FOR j = 1 TO 3
PRINT la(j);
NEXT j
LET j = 3
LET k = 2
item = 5
WHILE (j >= k)
la(j + 1) = la(j)
j = j - 1
WEND
la(k) = item
n = n + 1
PRINT "array elements after insertion"
FOR k = 1 TO 4
PRINT la(k);
NEXT k
END
PROGRAM RESULT
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3pnYjuTsovEftLGOopJz0ly1KBVfT11Bu3Xl1Uhj47Lz2ahG2u_vxWtqkXUweelS5M1noGTmldVV3H-V4eVyAdN7HCGgHaQqX18XN93Vu5GgFa4VeFXJavnf7FDT-9wx8UKZ-xPK4tSM/s400/1.png)
0 Comments
If you have further concerns, kindly drop a comment.