Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main(){
- int n;
- printf("\nIngrese un numero positivo: ");
- scanf("%d",&n);
- if(n<0){
- printf("\nEl numero es negativo, debe ser positivo");
- }
- if(n%2==1)
- printf("\nEl numero ingresado es primo");
- else
- printf("\nEl numero no es primo");
- }
Advertisement
Add Comment
Please, Sign In to add comment