Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int N,i,flag=1;
- printf("Enter Number ::");
- scanf("%d",&N);
- for(i=2;i<N;i++)
- {
- if(N%i==0)
- {
- flag=0;
- break;
- }
- }
- if(flag==1)
- {
- printf("The number is Prime");
- }
- else
- {
- printf("The number is Not prime");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement