Skip to main content

Write a C program to check whether a number is negative, positive or zero.

 Que : write a c programm to find the number is positive  or negative.

 Ans :

        #include<stdio.h>


int main()


{

int x;

printf("Enter any number :) ");

scanf("%d",&x);

if(x>0)

{

printf("This is positive number");

}

if(x<=0)

{

printf(" Zero ya Negative Baby :) ");

}

 

return 0;

}


***********************************************************************************

.....................Now its time to show Input and Output of the question.........................................

***********************************************************************************



***********************************************************************************

.....................................If number is negative or zero the he show this :..........................


.......................................If Number is Positive then he show this :............................................




***********************************************************************************


Comments

  1. [Free download] Download Pro Blogger Template and Make Your Blog Like Pro:
    Free to Download and Use



    For Any Help WhatsApp Me:+91 9883282271

    ReplyDelete

Post a Comment