Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
- int main()
- {
- int num;
- printf("ingrese entero\n");
- scanf("%i",&num);
- do{
- printf("ingrese entero\n");
- scanf("%i",&num);
- }
- while(num<1);
- else if(num > 0){
- printf("su numero positivo\n");
- if(pow(num,0.5)*pow(num,0.5) == num){
- printf("su numero es un cuadrado perfecto");
- }
- }
- else if(num%2 == 0){
- printf("su numero es par\n");
- }
- else if(num%2 != 0){
- printf("su nunmero es inpar\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement