I have an integer value, such as 5794. I want apply a several of calculations on each number without using array
Example
int encrypt;
cout << "Enter 4 digit numbers to encryption :> ";
cin >> encrypt;
for(int i=1;i<=encrypt;i++){
cout << encrypt << endl;
}
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:
5
7
9
4
I do not want it to be displayed like this:
5794