Use of n-1 in the question below

Given a positive number N(>1) design and algorithm to check if the given number is prime or not, prime and express it by means of pseudo code