Complete the code to check if a number is positive.
if (num [1] 0) { printf("Positive number\n"); }
Complete the code to check if a number is negative.
if (num [1] 0) { printf("Negative number\n"); }
Fix the error in the nested if statement to check if a number is zero.
if (num > 0) { printf("Positive\n"); } else if (num [1] 0) { printf("Zero\n"); } else { printf("Negative\n"); }
Fill both blanks to complete the nested if-else that prints if a number is positive even or odd.
if (num [1] 0) { if (num [2] 2 == 0) { printf("Positive even\n"); } else { printf("Positive odd\n"); } }
Fill all three blanks to complete the nested if-else that categorizes a number as positive even, positive odd, or non-positive.
if (num [1] 0) { if (num [2] 2 [3] 0) { printf("Positive even\n"); } else { printf("Positive odd\n"); } } else { printf("Non-positive number\n"); }
