Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # include <stdio.h>
- # include <stdlib.h>
- int EsPrimo(int x)
- {
- if(x/x==1 && x/1==x)
- {
- return 1;
- }
- else
- {
- return 0;
- }
- }
- int main(){
- int n,m;
- printf("ingrese el numero: \n");
- scanf("%d",&n);
- m=EsPrimo(n);
- printf("el numero %d es: %d\n",n,m);
- system("pause");
- return 0;
- }
Add Comment
Please, Sign In to add comment