C LANGUAGE - TO CHECK GIVEN NUMBER POSITIVE OR NEGATIVE

/* * C program to check whether a given integer is positive * or negative */ #include <stdio.h> int main() { int number; printf("Enter a number "); scanf("%d", &number); if (number >= 0) { printf("%d is a positive number ", number); } else { printf("%d is a negative number ", number); } }
Note: Click on copy button to copy the given code and you can paste it in any online compiler to see the result, IF YOU ARE A MOBILE USER THEN DOWNLOAD "CODING C"(Free App) COMPILER FROM GOOGLE PLAY STORE.