Prime Show

Best Prime Example Is Availble in my another post. Kindly check.
http://zakilive.com/2017/05/12/check-the-number-is-prime-or-not-in-c-easy-and-details-explanation/

problem:
Write a program to show prime from 0 to N  where N will be taken from user.
code:

Another Logic:

Another Logic collected from this link:
http://www.techcrashcourse.com/2015/11/c-program-to-print-all-prime-numbers-between-1-to-N.html
Understood the implementation of the code.