Advertisement
Guest User

Primszam

a guest
Nov 1st, 2014
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int i=2,x;
  5. scanf("%d",&x);
  6. for (i=2;i<=x-1;i++)
  7. {
  8. if (x%i==0)
  9. {
  10. printf("Nem prim szam");
  11. break;
  12. }
  13. }
  14. if (i==x)
  15. printf("Prim szam");
  16. getch();
  17. return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement