Is the pseudo code written below correct for the question
Input a number
X = number - 1
If X mod 2 = 0 then
Print number, “is not a prime number”
Else
Print number, “is a prime number”
No. You are just lowering the entered number by one and check if it is divisible by 2.
Basically, you would have to do something like this:
Beware that this is not optimized at all, but the concept is correct.