Prime or not prime

please help in writing program