The code as written seems to work.
It pauses after every line of output. You could change that by putting the pause at the end of main() (just before the return 0;) instead of at the end of printmovie().