You could try finding the remainder of every number from 2 to one less than the number with a loop. If the remainder is ever 0 then it's a composite.
Global number num=8175
Global number isComposite=0
Repeat num-3 times
Compare num%(loopindex+2) =0
--- stop loop
--- set isComposite to 1