QBASIC PROGRAM TO FIND PRODUCT OF EVEN NUMBERS OF A NUMBER

QBASIC PROGRAM TO FIND PRODUCT OF EVEN NUMBERS OF A NUMBER



CLS
 INPUT ENTER ANY NUMBER; N
 P = 1
 WHILE N < > 0
 R = N MOD 10
 IF R MOD 2 = 0 THEN P = P * R
 N = N \ 10
 WEND
 PRINT "PRODUCT OF EVEN DIGITS"; P
 END

USING SUB


DECLARE CLS
 INPUT ENTER ANY NUMBER; N
 P = 1
 WHILE N < > 0
 R = N MOD 10
 IF R MOD 2 = 0 THEN P = P * R
 N = N \ 10
 WEND
 PRINT "PRODUCT OF EVEN DIGITS"; P
 END SUB

Post a Comment

0 Comments