The program is indicating an issue with GetInt and I am unsure of how to resolve this. Is it a formatting issue or a coding issue?This is a screenshot of the code and error message


first of all, you didn't declare the h variable before using it. example int h;

second, your if condition should be: if((n < 1) || (n > 23))

lastly, when you were compiling it seems make didn't link your source code to the cs50.h header file. I don't know about cc but with gcc you can compile like this: gcc -o program program.c -lcs50

Not the answer you're looking for? Browse other questions tagged .