TASK-
Write a C program to check that a given no. is positive or negative.
CODE:
#include<stdio.h>
int main(){
int num;
printf("\tEnter the number: ");
scanf("%d",&num);
//condition
if (num>0)
printf("\n\t%d is a positive number",num);
else if (num<0)
printf("\n\t%d is a negative number",num);
else
printf("\tThis is zero");
getchar();
return 0;
}
Expected Output: