Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - C program. Who can translate it? Please provide details.
C program. Who can translate it? Please provide details.

int n;

int i,k;

int tmp,m; //Five integer variables are defined

printf ("Please enter a decimal number:\n");

scanf("%d",&n); //Read an input variable

printf("2 ");//Output 2

for(i=30,k=n;i>=0;i--) //Loop 30 times and assign the initial value to K as the input N

{

tmp=int(pow(2,i)); //tem =2 raised to the i power

m=k/tmp; //m =K divided by tem

printf("%d",m); //Output M

k=k-m*tmp; //Reassign K

< p> }

printf("\n4 ");

Each loop below is similar