4W interview question

prime or not.if prime replace 0 if not replace 1