已解决问题

b-box的高手请M我?

[ 标签:b-box,高手 ]
想认识一位b-box高手一起交流
呲侽孓吣慯ㄋ 回答:1 人气:1 解决时间:2008-09-07 09:01
  
满意答案
b-box 13794213730
//我大概改了一下,发现错误不少,归纳起来就是:
//原来估计是在TC或者是在Unix下编译,所以在VC下有错误。
//函数返回很乱……


#include<stdio.h>
#include<time.h>
#include <stdlib.h>

struct box{ int a[10][10];
int count;}b;
int i,j;
void store()
{
i=rand();
j=rand();
if(b.a[i][j]==0)
b.a[i][j]=1;
}
void getbox(int m,int n)
{
i=m;j=n;
b.a[i][j]=0;
}
void display()
{
int k;
printf("存包箱分布情况:");
for(k=0;k<4;k++)
{for(k=0;k<4;k++)
//printf(); //这句要填上参数
printf("\n");}
}
void main()
{
char c=' '; int x,y;
b.count=0;
while(1)
{printf("请输入指令--存(i)? --取(o)? please input command(i/o):");
c=getchar();
if(c=='i'&&b.count<100)
{store();b.count++;display();}
else if(b.count==100)printf("箱已存满 the box is full!");
{printf("请输入箱号 please input the number:");
//getbox(x,y); //getbox到底要返回什么???
display();
//if(c=='z')exit(0);
}
}
}
于素秋 回答采纳率:24.4% 2008-09-07 08:55
评价答案
  • 是否解决问题(参与评价0次)
  • 0
  • 0
  • 0
  • 是否原创答案(参与评价0次)
  • 0
  • 0

相关内容