Find Negative Or Positive Number

#include "stdio.h"
#include "conio.h"
int main (void)
{
    int a;    printf("Please enter a number\n");
    scanf("%d", &a);
    if(a<0)
    {
           printf("The number is negative\n");
    }
    else
    {
        printf("The number is positive\n");
    }
    getch();
    return 0;
}

0 comments:

Post a Comment