QBASIC

cls
c=0
input "enter any number";n
for i=1 to n
if n mod i=0 then c=c+1
next i
if c=2 then
print "the given no is prime"
else
print "the given no is composite"
end if
end

Comments

Popular posts from this blog

Tihar