Created
September 18, 2014 18:57
-
-
Save ntddk/b7e15a93982cb102e7bd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n;f;i;main(){scanf("%d",&n);printf("%d ",n);if(n<=1)f=1;for(i=2;++i<=n/2;){if(n%i==0)f=1;break;}printf((f==0)?"is a prime number":"is not a prime number");} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment