Professional Documents
Culture Documents
h"
#include "stdio.h"
#define max 100
struct Stack
{
char A[max];
int top=-1;
};
Stack s;
printf("Nhap vao n:\n");
scanf("%d",&n);
while(n>0){
if(n%2==0)
push(s,0);
else
push(s,1);
n=n/2;
}
printf("Nhi phan tuong ung la:\n");
while(kiemtrarong(s)!=1){
x=pop(s);
printf("%d",x);
}
return 0;
}