An algorithm to check given number is positive, negative or zero.

1) START

2) Enter Any ZERO , Positive OR Negative As Gno

3) Check if ( Gno == 0) then continue Else Goto Step 6

4) Print Given Number is ZERO

5) GoTo Step 10

6) Check if ( Gno > 0) then continue Else Goto Step 9

7) Print Given Number is Positive

8) GoTo Step 10

9) Print Given Number is Negative.

10) END

Flowchart to check given number is positive, negative or zero.

Flowchart to detect given number Zero, Positive or negative
Flowchart to detect given number Zero, Positive or negative

C-Code check given number is positive, negative or zero.

#include<stdio.h>
void main()
{
int gno;
printf("Enter any number:");
scanf("%d",&gno);
if(gno= =0)
printf("\nThe given number is Zero");
else
   {       
         if(gno>0)
              printf("The given number is positive ");
        else
              printf("The given number is negative ");
   }  
}