I don’t understand why we are reading the N just after start.
Check prime number
first work is to take input from user then only on that number we can process and at end give output to user
then where what you think ?
where should we have to read N