void jinzhizhuanhuan(int N,int B)
{int i;
stack init_sequence_stack(sequence_stack &sq);
while(N)
{push(&sq,N%8);
N/8;}
while(!stackempty(&s))
{i=pop(&s);
prinf("%d",i);}
}
#define maxsize 100
typedef struct sequence_stack{
int a[100];
int top;}stack;
stack init_sequence_stack(sequcece_stack *sq)
{sq->top=0;}
stack stackempty(sequence_stack *sq)
{return(sq->top?1:0);}
stack push(sequence_stack *sq,int x)
{int i;
if(sq->top==maxsize)
{printf("the stack is full");exit(1);
sq->a[i]=x;
sq->top++;}
stack pop(sequence_stack *sq)
{if(!sq->top)
{printf("the stack is empty");exit(1);}
sq->top--;}
main()
{int N;
prinrf("input a number N:")
jinzhizhuanhuan(N);
}
错误很多 ,我知道,以后再写一下