// Demonstration of simple if statements // with simple conditions // // Written by: Angela Finlayson // Date: 14/09/2024 #include int main(void) { // Note the indentation if (1) { printf("Hooray\n"); } if (0) { printf("Yay!\n"); } if (4 == 4) { printf("I love C!\n"); } if ('Z' == 'z') { printf("I am cool!\n"); } int x = 5; int y = 10; if (x < 0) { printf("x is negative!\n"); } if (y >= x) { printf("y is greater or equal\n"); } if (x != y) { printf("x and y not equal!\n"); } return 0; }