sandra0309

vezba17

Dec 7th, 2014
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.24 KB | None | 0 0
  1. #include<stdio.h>
  2. //da se proveri prost broj
  3. int main ()
  4. { int i,n;
  5.  scanf("%d",&n);
  6.  for(i=2;i<=n-1;i++)
  7.  {
  8.   if (n%i!=0)
  9.     {
  10.     printf("prost broj");
  11.     break;
  12.     }
  13.     else
  14.     printf("ne e prost broj");
  15.     break;
  16.  }
  17.  
  18.  
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment