Wednesday, October 16, 2019

QBASIC to check whether the number is divisible by 13 or not using SUB

DECLARE SUB CHECK ( N )
INPUT "Enter any number "; N
CALL CHECK ( N)
END

SUB CHECK ( N )
IF N MOD 13 = 0 THEN
PRINT "The number is divisible by 13"
ELSE
PRINT "The number is not divisible by 13"
END IF
END

No comments:

Post a Comment