🚀 Code smarter. Crack exams faster. Free AI-powered learning on Leyaa.ai →

Positive or Negative

Write a program to check whether a given number is Negative or Positive.

Pictorial Explanation

Positive or Negative number




Procedure

Get input from user.

If the input is zero, Print neither positive nor negative.

Else

If the input less than zero, print negative

else, print positive.




Example

Case 1

Input

10

Output

Positive

Case 2

Input

-13

Output

Negative

Case 3

Input

0

Output

Neither positive nor negative




Program

Example

#include<stdio.h>

int main()
{
    int num;
 
    scanf("%d",&num);
 
    if(num == 0)
        printf("Neither positive nor negative");
    else if(num < 0)
        printf("Negative");
    else
        printf("Positive");
     
    return 0;
}


🚀 Your coding + exam prep journey starts here

Learn Python, C, Java, SQL & 90+ technologies. Practice for IBPS, SSC, Railway & 200+ exams. All powered by AI. All free.

Get Started on Leyaa.ai →