Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int
- prosto (int n)
- {
- if ((n == 0) || (n == 1) || (n < 0))
- {
- return (0);
- }
- int z = 2;
- while (z < n){
- if (n % z == 0)
- {
- return 0;
- }
- z++;
- }
- return 1;
- }
- int
- main ()
- {
- int index;
- prosto (index);
- printf ("%d", prosto (-9));
- }
Advertisement
Add Comment
Please, Sign In to add comment