Guest User

Untitled

a guest
Jan 22nd, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. # include <stdio.h>
  2. # include <stdlib.h>
  3.  
  4. int EsPrimo(int x)
  5. {
  6. if(x/x==1 && x/1==x)
  7. {
  8. return 1;
  9. }
  10. else
  11. {
  12. return 0;
  13. }
  14. }
  15. int main(){
  16. int n,m;
  17. printf("ingrese el numero: \n");
  18. scanf("%d",&n);
  19. m=EsPrimo(n);
  20. printf("el numero %d es: %d\n",n,m);
  21. system("pause");
  22. return 0;
  23. }
Add Comment
Please, Sign In to add comment