How can I create loop using int value in c++ (simple)
<p>I have an integer value, such as 5794.  I want apply a several of calculations on each number without using array</p>

<p><strong>Example</strong></p>

<pre><code>int encrypt;
cout &lt;&lt; "Enter 4 digit numbers to encryption :&gt; ";

cin &gt;&gt; encrypt;

for(int i=1;i&lt;=encrypt;i++){
   cout &lt;&lt; encrypt  &lt;&lt; endl;
}
</code></pre>

<p>This code prints the whole number, but I want to print each digit without using array.  If the number is 5794, I want to display: </p>

<pre><code>5
7
9
4
</code></pre>

<p>I do not want it to be displayed like this:</p>

<pre><code>5794
</code></pre>
