进制转换
int gcd(int x,int y)
{
int temp=0;
while(y)
{
temp=y;
y=x%y;
x=temp;
}
return x;
}
void convert(int x,int target)
{
stack<int> data;
while(x)
{
data.push(x%target);
x/=target;
}
cout<<target<<"进制为 ";
while(!data.empty())
{
cout<<data.top();
data.pop();
}
cout<<endl;
}