CLS

DIM N(10) AS STRING

FOR I = 1 TO 10

INPUT "ENTER THE STRINGS"; N(I)

NEXT I

FOR I = 1 TO 10

FOR J = 1 TO 10 - I

IF N(J) > N(J + 1) THEN SWAP N(J), N(J + 1)

NEXT J

NEXT I

PRINT "STRINGS ARRANGED IN ASCENDING ORDER"

FOR I = 1 TO 10

PRINT N(I)

NEXT I

END

USING SUB PROCEDURE

DECLARE SUB SORT (N())

CLS

DIM N(10) AS STRING

FOR I = 1 TO 10

INPUT "ENTER THE STRINGS"; N(I)

NEXT I

CALL SORT(N())

PRINT "STRINGS ARRANGED IN ASCENDING ORDER"

FOR I = 1 TO 10

PRINT N(I)

NEXT I

END

SUB SORT (N())

FOR I = 1 TO 10

FOR J = 1 TO 10 - I

IF N(J) > N(J + 1) THEN SWAP N(J), N(J + 1)

NEXT J

NEXT I

END SUB

## No Comments