Write a qbasic program to display prime or composite number.

Write a qbasic program to display prime or composite number.


CLS
INPUT "Enter a number ";n
FOR j=1 TO n
       IF n MOD j=0 THEN c=c+1 
NEXT j
IF c=2 THEN
       PRINT "It is prime number"
ELSE
       PRINT "It is composite number"
END IF
END