Check out example codes for "rust how to make print happen before asking for input". It will help you in understanding the concepts better.
Code Example 1
/* For performance reasons, standard output is buffered. The write completes but it is only writing to memory. If you want it to actually display to the user, you have to trigger a flush. This can be done either by writing a newline, or by doing it explicitly: */
Learn ReactJs, React Native from akashmittal.com