|
Help
Dec 23, 2009 4:06:04 GMT
Post by qbnoob on Dec 23, 2009 4:06:04 GMT
I need help on this program, CLS
INPUT "Pick a number. ", num FOR index = 1 TO num IF CINT(num/index) = num / index THEN PRINT index END IF NEXT index
It checks divisibility, but after It displays the divisibility, I want it to display Prime or Composite. In other words, I want it to look like this.
CLS
INPUT "Pick a number. ", num FOR index = 1 TO num IF CINT(num/index) = num / index THEN PRINT index END IF NEXT index PRINT CALL ttlindex
With ttlindex being an IF on wheter it is Prime or composite, and printing whichever it is. (for all the other noobs CALL is for a SUB program) thanks
|
|