Splitting integers using Modulus and division

I am new to C++.NET. I am also taking refresher courses in math, so if the solution to this seems obvious, i am sorry.
The project in my book:
Console Program.
Take any 5 digit integer (for the this example, 45339), split the characters and output them with a space between.
45339 out puts to:
4 5 3 3 9
I know data types, how to get the input and the like, but it wants me to use the modulus and division operators to "pick off" each digit and display it with spaces between each character. I know how to concac and get the spaces, but the math using the mod and div escapes me. I know i am over thinking this but I am burnt out. This is actually a project from 2 chapters ago in my book, but to do the basic encryption project we are working on now, I have to understand this one, (which he never assigned in the first place). Also, no loops. I can only use the info covered in the chapter which was pretty basic math, variables, and the if statement.
[983 byte] By [DannyYoder] at [2007-12-17]
# 1

This is a duplicate of http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=108815. You really don't have to post in every forum!

Thanks,
Ayman Shoukry
VC++ Team

AymanShoukry at 2007-9-9 > top of Msdn Tech,Visual C++,Visual C++ General...
# 2
<Danny Yoder@discussions.microsoft.com> wrote in messagenews:f2ce4c45-c4d5-47f2-afd2-c58f4bc9a64f@discussions.microsoft.com > The project in my book:> Console Program.> Take any 5 digit integer (for the this example, 45339), split the> characters and output them with a space between. > > 45339 out puts to:> 4 5 3 3 9> > I know data types, how to get the input and the like, but it wants me> to use the modulus and division operators to "pick off" each digit> and display it with spaces between each character. Given an integer x, (x % 10) calculates the rightmost (least significant) decimal digit (e.g. 45339 % 10 == 9), and (x / 10) removes the rightmost digit (e.g. 45339 / 10 == 4533)-- With best wishes, Igor Tandetnik
MVPUser at 2007-9-9 > top of Msdn Tech,Visual C++,Visual C++ General...