10 input "enter a no."; n
20 for i = 1 to n
30 if n mod i = 0 then c = c +1
40 next i
50 if c = 2 then print "Prime number" else print "not a prime number"
60 end
Chat with our AI personalities
Difference between QBASIC and GWBASIC?
Write your own prime number program and find out.
Use Wolfram|Alpha... go to the related link below, Wolfram|Alpha, and type in (is __ (number) prime) and then the program will compute that and tell you if it is prime or composite.
just type "chikosalovakia" on gw basic .......................it will give you all instructions............it is a special code.................
program to find prime number in 8085 microprocessor