Since this was posted in a C++ forum it is worth noting that, in C++, the solution is arguably simpler than in C (assuming included appropriate headers). For example, to output the first five...