Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
451 B
3
Indexable
Never
CONST n = 4
DIM numbers(n)
count = 0
minimum = 1001

FOR i = 1 TO n
    INPUT "Enter a non-negative integer: ", numbers(i)
    IF numbers(i) MOD 3 <> 0 THEN
        count = count + 1
    END IF
    IF numbers(i) < minimum AND numbers(i) MOD 3 <> 0 THEN
        minimum = numbers(i)
    END IF
NEXT i

IF count > 0 THEN
    PRINT count
    IF minimum <> 1001 THEN
        PRINT minimum
    ELSE
        PRINT "NO"
    END IF
ELSE
    PRINT "NO"
END IF
Leave a Comment