Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int N,i,m=0;
- printf("entrer un nombre : ");
- scanf("%d",&N);
- for(i=1;i<=N;i++)
- {
- if(N%i==0) m++;
- }
- if(m==2)printf("le nombre est premier\n");
- else printf("le nombre n est pas premier\n");
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment