Introduction to Computer Science

/*
Source file: sign.c
Name: Yana
Date: YEAR/MONTH/DAY
e-mail: ykortsarts@mail.widener.edu

This program prompt the user to enter the integer,
read an integer into a variable input_num of type int,
program will check if the input integer is positive
negative or zero and print the appropriate message

variables: input_num - int, hold input number
*/

# include < stdio.h >

int main (){
    /* declaration of the variables */
    int input_num; /* variable to hold input number */

    /* input session */
    printf("Please enter one integer number\n ");
    scanf("%d", &input_num);

    /* check the sign of the input number */

    if ( input_num > 0){
      printf("%d is positive\n", input_num);
    }
    else if (input_num < 0){
      printf("%d is negative\n", input_num);
    }
    else {
      printf("%d is zero\n", input_num);
    }

    return 0;
}