BrainChild, 8181 57 bytes
function(intinclude*;int i)->int{ifj=int i=getint(i<2)return 0int j=1while;while(++j--j&&i%j)<i if!0print(i%jj==1)return 0return 1} Saved 24 bytes thanks to @Deadcode
Readable
functioninclude isPrime(io.bc; int i) -> int{ if= getint(i<2) return 0; int j = 1;i; while ((++j)<i) --j if&& (!(i%j)) return 0 return 1 {} print(j==1)