C Program to Check Sign

 #include<stdio.h>

void main()

{

    int n;

    printf("Enter number: ");

    scanf("%d",&n);


    if(n>0)

    printf("Positive");

    else if(n<0)

    printf("Negative");

    else

    printf("Zero");

}

Comments

Popular posts from this blog

Single Program Using All Automatic String Functions

C program for subtraction of two matrices (2D Arrays)

C program for Multiplication of Two matrices