C语言错误怎么改?
#define Maxsize 100#include<stdio.h>
#include<malloc.h>
typedef int datatype;
typedef struct
{
int stack[Maxsize];
int top;
}SeqStack;
SeqStack *InitStack()
{ SeqStack *S;
S=(SeqStack *)malloc(sizeof(SeqStack));
if(!S)
{printf("空间不足");return NULL;}
else
{S->top=0;
return S;
}
}
SeqStack *push(SeqStack *S,int x)
{ if(S->top==Maxsize)
{printf(" the stack is overflow!\n");
return NULL;
}
else
{S->stack[S->top]=x;
S->top++;
return S;
}
}
int StackEmpty(SeqStack *S)
{ if(S->top==0)
return 1;
else
return 0;
}
int pop(SeqStack *S)
{int y,FALSE;
if(S->top==0)
{printf("the stack is empty!\n");return FALSE;}
else
{S->top--;
y=S->stack[S->top];
return y;
}
}
void conversion(int N,int r)
{ int x=N,y=r;
SeqStack *s;
s=InitStack();
while(N!=0)
{push(s,N%r);
N=N/r;
}
printf("\n十进制数%d所对应的%d进制数是:"x,y);
while(!StackEmpty(s))
printf("%d",pop(s));
printf("\n");
}
main()
{int n,r;
printf("请输入任何一个十进制整数及其所需转换的二至九间的任一进制数:\n");
scanf("%d%d",&n,&r);
conversion(n,r);
}