CLS

FOR I = 1 TO 10

INPUT "ENTER THE NUMBERS"; N(I)

IF N(I) MOD 2 = 1 THEN S = S + N(I)

NEXT I

PRINT "SUM OF 10 ODD NUMBERS"; S

END

USING SUB PROCEDURE

DECLARE SUB SUM (N( ))

CLS

FOR I = 1 TO 10

INPUT "ENTER THE NUMBERS"; N(I)

NEXT I

CALL SUM(N( ))

END

SUB SUM (N())

FOR I = 1 TO 10

IF N(I) MOD 2 = 1 THEN S = S + N(I)

NEXT I

PRINT "SUM OF 10 ODD NUMBERS"; S

END SUB

USING FUNCTION PROCEDURE

DECLARE FUNCTION SUM (N( ))

CLS

FOR I = 1 TO 10

INPUT "ENTER THE NUMBERS"; N(I)

NEXT I

PRINT "SUM OF 10 ODD NUMBERS"; SUM(N( ))

END

FUNCTION SUM (N())

FOR I = 1 TO 10

IF N(I) MOD 2 = 1 THEN S = S + N(I)

NEXT I

SUM = S

END FUNCTION

## No Comments