I would be surprised if your teacher marked you down for fixing these things. They have nothing to do with the logic and problem solving aspects of the assignment. If you fix those, your program will still do "what it is supposed to do". The only difference is that you will be adhering to the C standard and good programming practice, and there will be no undefined behavior. You could try to approach your teacher diplomatically, and say something like "I read that void main and fflush(stdin) result in undefined behavior and can cause problems. Should I be using int main(void) instead? Are there better ways to flush the input buffer?"