Complete the code to check if a number is positive.
if (num [1] 0) { printf("Positive\n"); }
The condition num > 0 checks if the number is positive.
Complete the else-if ladder to check if a number is zero.
if (num > 0) { printf("Positive\n"); } else if (num [1] 0) { printf("Zero\n"); }
The condition num == 0 checks if the number is exactly zero.
Fix the error in the else-if ladder condition to check if a number is negative.
if (num > 0) { printf("Positive\n"); } else if (num [1] 0) { printf("Negative\n"); }
The condition num < 0 correctly checks if the number is negative.
Fill both blanks to complete the else-if ladder that prints the sign of a number.
if (num [1] 0) { printf("Positive\n"); } else if (num [2] 0) { printf("Negative\n"); } else { printf("Zero\n"); }
The first condition checks if num > 0 (positive), the second if num < 0 (negative), else zero.
Fill all three blanks to complete the else-if ladder that categorizes a number.
if (num [1] 0) { printf("Positive\n"); } else if (num [2] 0) { printf("Negative\n"); } else if (num [3] 0) { printf("Zero\n"); }
The conditions check if num > 0 (positive), num < 0 (negative), and num == 0 (zero).
