Write a program to enter number and display ""Positive"" or ""Negative"".
Answers
Answered by
0
Answer:
CLS
INPUT"ENTER A NUMBER ";N
IF N<0THEN
PRINT "NEGETIVE"
ELSEIF N>0THEN
PRINT"POSITIVE"
END IF
END
MARK BRAINLIEST
Answered by
5
Answer:
#include <stdio.h>
int main() {
double num;
printf("Enter a number: ");
scanf("%lf", &num);
if (num <= 0.0) {
if (num == 0.0)
printf("You entered 0.");
else
printf("You entered a negative number.");
} else
printf("You entered a positive number.");
return 0;
}
Similar questions
Computer Science,
2 months ago
English,
2 months ago
World Languages,
2 months ago
Math,
5 months ago
History,
11 months ago
Biology,
11 months ago
Math,
11 months ago