#include<stack>
#include<iostream>
using namespace std;
void transform(int num,int converteddec)
{
stack<char> a;
if(converteddec!=16)
{
while(num!= 0)
{
a.push(num%converteddec+'0');
num=num/converteddec;
}
while(!a.empty())
{
cout<<a.top();
a.pop();
}
}
else
{
while(num!= 0)
{
if(num%converteddec<10)
a.push(num%converteddec+'0');
else
a.push(num%converteddec+'A'-10);
num=num/converteddec;
}
while(!a.empty())
{
cout<<a.top();
a.pop();
}
}
cout<<endl;
}
int main()
{
int num=13;
transform(num,10);
return 0;
}