Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- #include <stdio.h>
- int primo (int n) {
- for(int m=2; m<n; m++) {
- if (n%m!=0)
- continue;
- else
- return 1;
- }
- return 0;
- }
- main() {
- int a;
- printf("entre com um valor");
- scanf("%d",&a);
- printf("%d\n",primo(a));
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment