Small dishes recently Review data structure ~ ~
It's a simple thing to knock on.
That's it, PO code.
#include <stdio.h> #include <stdlib.h> #include <math.h> #define STACK_INIT_SIZE #define STACK_INCR
easement typedef char Elemtype;
typedef struct{ELEMTYPE *base;
Elemtype *top;
int stacksize;
}sqstack;
void Initstack (Sqstack *s) {s->base= (Elemtype *) malloc (stack_init_size*sizeof (elemtype));
if (!s->base) exit (0);
s->top=s->base;
s->stacksize=stack_init_size;
int Stacklen (Sqstack s) {return (s.top-s.base);} void push (Sqstack *s,elemtype e) {if (s->top-s->base>=s->stacksize) {s->base= (Elemtype *) realloc
(S->base, (stack_increasement+s->stacksize) *sizeof (elemtype));
if (!s->base) exit (0);
} * (S->top) =e;
s->top++;
} void Pop (Sqstack *s,elemtype *e) {if (s->top==s->base) {return;
} s->top--;
*e=* (S->top);
int IsEmpty (Sqstack *s) {return s->top==s->base;}
int main () {Sqstack s,t; EleMtype C;
Initstack (&s);
Initstack (&t);
scanf ("%c", &c);
while (c!= ' # ') {//When input # input ends with characters read into push (&S,C);
scanf ("%c", &c);
} getchar ();
int sum;
int i,j;
int Slen=stacklen (s);
for (i=0;i<slen;i+=3) {sum=0;
for (j=0;j<3;j++) {if (!isempty (&s)) {pop (&s,&c);
sum+= (c-48) * (int) pow (2,j);
} push (&T,SUM+48);
int Tlen=stacklen (t);
for (i=0;i<tlen;i++) {pop (&t,&c);
printf ("%c", c);
return 0;
}