It takes a bit of practice to learn how to sequence your program development so that it's testable as you go along.
The user interface, or input/output is started first (but maybe not finalized) so you can see what your program is doing.