Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (19 sloc) 513 Bytes
/* Sandeepa Nadahalli
* C program to check whether a given integer number is positive or negative.
* Originally posted at
* On
#include <stdio.h>
void main()
int number;
printf("Enter a number\n");
scanf ("%d", &number);
if (number > 0)
printf ("%d is a positive number\n", number);
else if (number < 0)
printf ("%d is a negative number\n", number);
printf("You entered 0\n");
You can’t perform that action at this time.