Kulverstukas is correct. You need to have 2 functions in addition to main(). The first function should be called 'ReadNumber' and the second function should be called 'WriteAnswer'. Also, try not to use global variables. The point of this exercise is to pass variables between functions. Your 'get_num' function does not actually return a value even though it is declared as having an integer return type.