Advertisement
sujonshekh

prime number

Dec 30th, 2015
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. int main()
  4. {
  5. int i,n;
  6. printf("Enter The positive number");
  7. scanf("%d",&n);
  8. for(i=2;i<=2;i++)
  9. {
  10. if(n%i==0)
  11. {
  12. break;
  13. }
  14. }
  15. if(n==i)
  16. printf("The number is prime");
  17. else
  18. printf("The number is not Prime");
  19.  
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement