CPP实现的回文判断

时间:2013-07-25 16:46:21
【文件属性】:
文件名称:CPP实现的回文判断
文件大小:1KB
文件格式:TXT
更新时间:2013-07-25 16:46:21
回文 C++ 回文 C++ void initstack(seqstack *s) { s->top=-1; } int isempty(seqstack *s) { return(s->top==-1?TRUE:FALSE); } void push(seqstack *s,char x) { if(s->top==stacksize-1) {printf("达到输入上限!\n");return;} s->top++; s->elem[s->top]=x; } void pop(seqstack *s,char *x) { if(s->top==-1) {printf("请先输入字符!\n");return;} *x=s->elem[s->top]; s->top--; }

网友评论