//位操作+递归 (十进制转为二进制)
#include<iostream>
using namespace std;
void print(int,int);
int main()
{
unsigned int x;
cout<<"Input number:"<<endl;
cin>>x;
print(x,16);
cout<<endl;
return 0;
}
void print(int x,int n)
{
if(n>0)
{
putchar('0'+((unsigned)(x&(1<<(n-1)))>>(n-1)));
print(x,n-1);
}
}