I have copy/paste my code below for a program. However, I need the numbers to be output in the reverse order than they are currently outputted. For example, if the user enters the number 5432, I need the output to be 5 4 3 2 (Not 2 3 4 5). Please advise on the simplest form to do so. Thanks!
#include <iostream>
using namespace std;
int main()
{
int digit;
cout << "Enter a positive number: " << endl;
cin >> digit;
if (digit <= 0)
return main();