I only looked at it for about 5 seconds, but your line 21 isn't doing anything. final_number + last_number; // nothing is assigned here. Nothing changes
So that's probably where your bug is.
Edit: You also never initialize final_number to a value. It's a garbage value that's getting incremented.
You should also take a moment and look at your indentation. It's misleading as it stands right now. I suggest going through your code, line by line, operation by operation, and explain to yourself, out-loud, what is happening in the program. Talk to a rubber duck if necessary. https://en.wikipedia.org/wiki/Rubber_duck_debugging