It's because that during compiling at line 5 the compiler doesn't know about the newgame() function.
You need to declare the function as follows: (that way the compiler will know that a function called newgame exists and wouldn't be surprised);
You could also move newgame to be above main in the source ile. That would remove the need to declare the function. guestgulkan's way is more 'correct' allowing the order of functions in the file to not matter. The way I suggest is good for a quick 'hack'. Explaining this will hopefully also improve your understanding of what is going on.