Connect Me

twitterfacebookgoogle plus email

  Instagram View Biwas Bhattarai's profile on LinkedIn

QBASIC

REM QBASIC Program to display only Armstrong Numbers from 1 to 1000
DECLARE SUB arm ()
CLS
CALL arm
END

SUB arm
PRINT "Armstrong numbers from 1 to 1000 are "
FOR n = 1 TO 1000
i = n
a = 0
WHILE i <> 0
r = i MOD 10
a = a + (r ^ 3)
i = i \ 10
WEND
IF a = n THEN PRINT a
NEXT n
END SUB



Ą
https://www.flickr.com/photos/spklg/15211044551/