C Program given number integer is positive or negative

C Program given number whole number is certain or negative 

the accompanying project we are checking whether the information whole number is certain or negative. In the event that the information number is more prominent than zero, at that point its positive else it is a negative number. 

#include <stdio.h> 

void primary() 



int num; 

printf("Enter a number: \n"); 

scanf("%d", &num); 

in the event that (num > 0) 

printf("%d is a positive number \n", num); 

else if (num < 0) 

printf("%d is a negative number \n", num); 

else 

printf("0 is neither positive nor negative"); 



Output : 1: 

Number: 



0 is neither positive nor negative 

Output 2: 

Number: 

- 3 

- 3 is a negative number 

Output 3: 

Number: 

100 

100 is a positive number
Previous
Next Post »