#include<stdio.h>
int Binary_number(int dec){
int result = 0,temp = 1,yushu = 0;
while(1){
yushu = dec%2;
dec/=2;
result+=yushu*temp;
temp*=10;
if(dec<2)
{
result+=dec*temp;
break;
}
}
return result;
}
int main(){
int num;
printf("Please input the number: ");
scanf("%d",&num);
printf("The Binary number is: %d
",Binary_number(num));
return 0;
}