Connect Me

twitterfacebookgoogle plus email

  Instagram View Biwas Bhattarai's profile on LinkedIn
Showing posts with label prime digits. Show all posts
Showing posts with label prime digits. Show all posts

QBASIC Program to display prime digits of a supplied number

REM QBASIC Program to display prime digits of a supplied number
Declare Sub Disprime(n)
CLS
INPUT n
Call Disprime(n)
End
Sub Disprime(n)
m = n
PRINT "Prime digits are ";
WHILE n <> 0
r = n MOD 10
c = 0
n = n \ 10
FOR i = 1 TO r
IF r MOD i = 0 THEN c = c + 1
NEXT i
IF c = 2 THEN PRINT r
WEND
End SUB

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