#include
#include
using namespace std;
int main()
{
setlocale(LC_ALL, "Russian");
int n,v,k,z,a1,a2,t;
cin >> n;
k = 0;
t = 0;
v = 1;
a1 = n;
a2 = 0;
while (n != 0)
{
n = n % 10;
k++;
};
int *a = new int[k];
for (int i = 0; i <= k; i++)
{
a1 = a1 % 10;
a[t] = a1;
t++;
};
for (int i = 0; i <= k; i++)
{
t = 0;
a2 = a2 + a[t] * v;
v = v * 10;
t++;
};
cout << endl << a2 << " hi";
system("pause");
return 0;
}
#include
using namespace std;
int main()
{
setlocale(LC_ALL, "Russian");
int n,v,k,z,a1,a2,t;
cin >> n;
k = 0;
t = 0;
v = 1;
a1 = n;
a2 = 0;
while (n != 0)
{
n = n % 10;
k++;
};
int *a = new int[k];
for (int i = 0; i <= k; i++)
{
a1 = a1 % 10;
a[t] = a1;
t++;
};
for (int i = 0; i <= k; i++)
{
t = 0;
a2 = a2 + a[t] * v;
v = v * 10;
t++;
};
cout << endl << a2 << " hi";
system("pause");
return 0;
}