Changed it from "+" to ">"

This commit is contained in:
Sergio Sepulveda
2021-06-23 16:52:39 -07:00
committed by GitHub
parent 335cdc7520
commit 9947513ab9

View File

@@ -4,7 +4,7 @@ void main() {
int num;
printf("Input a number :");
scanf("%d", &num);
if (num += 0)
if (num >= 0)
printf("%d is a positive number \n", num);
else if (num == 0) {
printf("%d is zero \n", num);
@@ -12,4 +12,4 @@ void main() {
else {
printf("%d is a negative number \n", num);
}
}
}