January 9, 2017

Qbasic program to enter a multi digit number and display the product of its digits.

CLS
R = 1
INPUT "Enter a multi digit number: ", N
WHILE N <> 0
A = N MOD 10
R = R * A
N =FIX(N /10)
WEND
PRINT "Product of multi digit number is: ", R
END

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.