Primality by trial division: Difference between revisions

added J solution
m (→‎{{header|TI-83 BASIC}}: Spaces would be nice, but the calculator doesn't like them.)
(added J solution)
Line 117:
return true;
}
 
=={{header|J}}==
 
Actually<tt> 1&p: </tt>would do, but the task calls for using trial division, so:
 
isprime1=: 3 : 0
if. 3>:y do. 1<y else. 0 *./@:< y|~2+i.<.%:y end.
)
 
=={{header|LSE64}}==
Anonymous user