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