code--
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int x, a, b, c = 0;
cout << "Enter the number" << endl;
cin >> x;
for (int i = 0; i <= 7; i++)
{
a = pow(10, I);
b = 10 * ((x % a) - c) / a;
cout << b;
c = x % a;
}
}
The code is written to reverse the numbers but for 1024 vs code shows 04301000 and onlinegdb shows 04201000.