你能找出代码错误在哪里吗?
来源:互联网 发布:数据机房的空调 编辑:程序博客网 时间:2024/04/28 03:33
#include <stdio.h>#define MAXSIZE 100#include <stdlib.h>#define JINZHI 8typedef struct seqStack { int data[MAXSIZE]; int top ;} seqStack ;/**/seqStack seqStack_Init( );void output(seqStack s);void conversion()seqStack seqStack_Push(seqStack s,int x );seqStack seqStack_Pop( );seqStack seqStack_Get( );bool seqStack_IsEmpty( ); bool seqStack_IsFull( ); int main() { seqStack result; result=seqStack_Init() ; output(result); result=seqStack_Push(result,10); output(result); return 0 ; } seqStack seqStack_Init( ) { seqStack s; int i=0 ; for(i=0;i<MAXSIZE; i++) s.data[i] =0 ; s.top = -1; return s; } void output(seqStack s) { int i=0 ; for (i=0; i <=s.top; i++) printf("s[%d]= %d \n",i,s.data[i]); } seqStack seqStack_Push(seqStack s,int x ) { if (s.top==MAXSIZE-1) return s; s.top++ ; s.data[s.top] =x ; return s; } void conversion() { seqStack s= seqStack_Init(); int N=0; scanf("%d",&N); while(N) { seqStack_Push(s,N%JINZHI); N=N/JINZHI; } while( seqStack_IsEmpty()) { printf("%d",s.data[s.top]); s=seqStack_Pop(); } }
0 0
- 你能找出代码错误在哪里吗?
- 错别字,你能找出几个?
- ASP错误提示大全,让你快速找出错误,希望能给大家事来帮助。
- ASP错误提示大全,让你快速找出错误,希望能给大家事来帮助。
- 会java的你,能找出其中的问题吗
- 你在哪里
- Ubuntu,你在哪里?
- 大师,你在哪里
- Windows你在哪里?
- 机遇你在哪里???
- 你在哪里
- skasaskask 你在哪里
- 你在哪里?
- 谁能帮忙看一下,这个程序错误到底出在哪里?
- 你的客户在哪里
- 十年后,你在哪里
- 你的机遇在哪里
- 你的价值在哪里
- Nginx 解决session共享问题(jvm-route)方式
- Day1 - alias 配置指令的别名
- 傅老师课堂:Oracle高级应用之物化视图(materialized view)
- TextView省略号
- 2013年4月7日 数字音乐生态需要本土的iTunes和Amazon
- 你能找出代码错误在哪里吗?
- [Oracle命令] 表管理
- 【上邪】歌词
- 傅老师课堂:Oracle高级应用之合并MERGE
- iOS7主流设备
- 使用javascript开发的视差滚动效果的云彩 极客标签 - 做最棒的极客知识分享平台
- 发生中断时,cpsr中的内容是存放在哪个模式下的spsr寄存器中
- Hbase 执行事件(EventHandler 、 ExcutorService 、Excutor)
- DBLink简单描述