// Write a program guessing_game.c that // prompts the user enter an integer // prints out higher, lower, correct if it is equal to the secret number (42) // $ ./guessing_game // Please enter an integer: 8 // Higher! // $ ./guessing_game // Please enter an integer: 42 // Correct! #include #define SECRET_NUMBER 42 int main(void){ int guess; printf("Please enter an integer: "); int valid = scanf("%d", &guess); if (valid != 1) { printf("You did not enter an integer\n"); return 1; } if (guess == SECRET_NUMBER) { printf("Correct!\n"); } else if (guess > SECRET_NUMBER) { printf("Lower\n"); } else { printf("Higher\n"); } return 0; }