Q BASIC PROGRAM TO CHECK THE GIVEN NO IS PRIME OR COMPOSITE. SUB
DECLARE SUB CHECK(N)
CLS
INPUT "ENTER ANY NUMBER ";N
CALL CHECK(N)
END
SUB CHECK(N)
C=0
FOR I = 1 TO N
IF N MOD I=0 THEN C=C+1
NEXT I
IF C=2 THEN
PRINT "NO IS PRIME"
ELSE
PRINT "NO IS COMPOSITE"
END IF
END SUB
Search This Blog
Wikipedia
Search results
Subscribe to:
Post Comments (Atom)
Journey of Jagat Mandir H. S. School When I was at the age of three I joined the school in the village. When I came to K...
-
Journey of Jagat Mandir H. S. School When I was at the age of three I joined the school in the village. When I came to K...
-
VISIT TO ELECTION COMMISSION IN 2076 BHADRA 3(TUESDAY) WE WENT TO ELECTION TO LEARN THE ELECTION PROCESS AND HOW PEOPLE ELECTION PROCESS....
-
Dashain is the religious festival of Nepal. It is the longest and the most auspicious festival in the Nepalese annual calendar, celebr...
No comments:
Post a Comment