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);
- if(num == 0){
- printf("su numero es 0\n");
- }
- else if(num < 0){
- printf("su numero es negativo\n");
- if(pow(num*-1,0.5)*pow(num*-1,0.5) == num){
- printf("su numero es un cuadrado perfecto");
- }
- }
- 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