xxxxxxxxxx
25
const w = 400
const h = 400
function setup() {
createCanvas(w, h);
}
function isPrime(n){
let p = true
for (let d = 2;d<=Math.floor(Math.sqrt(n));d++){
if (n%d==0){p = !p;break}
}
return p
}
function draw() {
background(220);
n=20
let p =isPrime(n)
if (p==true){text(''+n,w/2,h/2)}
}