Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main()
- {
- int i=2,x;
- scanf("%d",&x);
- for (i=2;i<=x-1;i++)
- {
- if (x%i==0)
- {
- printf("Nem prim szam");
- break;
- }
- }
- if (i==x)
- printf("Prim szam");
- getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement