Computer Science, asked by tanushreedey1, 1 month ago

Solve the following program using QB64 :-

Accept a number from user and check if it is an Armstrong Number or not.

(e.g. 370 is Armstrong number. 33

+73

+03

=370)

Answers

Answered by Suhit123
0

Answer:

Explanation:

INPUT "Enter any number"; a

   n = a

   WHILE a <> 0

       r = a MOD 10

       s = s + r ^ 3

       a = a \ 10

   WEND

   IF s = n THEN

       PRINT  "Armstrong "

   ELSE PRINT "Not Armstrong "

   END IF

END

Similar questions