REM

CLS

DIM N(20)

FOR I = 1 TO 20

INPUT "ENTER THE NUMBERS"; N(I)

NEXT I

S = N(1)

FOR I = 2 TO 20

IF N(I) < S THEN S = N(I)

NEXT I

PRINT “THE SMALLEST NUMBER IS”; S

END

USING SUB PROCEDURE

DECLARE SUB SMALL (N( ))

CLS

DIM N(20)

FOR I = 1 TO 20

INPUT "ENTER THE NUMBERS"; N(I)

NEXT I

CALL SMALL (N( ))

END

SUB SMALL (N( ))

S = N(1)

FOR I = 2 TO 20

IF N(I) < S THEN S = N(I)

NEXT I

PRINT “THE SMALLEST NUMBER IS”; S

END SUB

USING FUNCTION PROCEDURE

DECLARE FUNCTION SMALL (N( ))

CLS

DIM N(20)

FOR I = 1 TO 20

INPUT "ENTER THE NUMBERS"; N(I)

NEXT I

PRINT “THE SMALLEST NUMBER IS”; SMALL (N( ))

END

FUNCTION SMALL (N( ))

S = N(1)

FOR I = 2 TO 20

IF N(I) < S THEN S = N(I)

NEXT I

SMALL = S

END FUNCTION

## No Comments