要做一个小型超市的管理系统,哪位大神能帮忙做一下用java或者jsp急求!!! 20
2016-01-07
展开全部
int main(int argc, char *argv[])
{
char buf[BUF_SIZE];
int res = 1;
int flag = 1;
int index = 0;
while(flag) // do this untial input exit commond
{
printf("|->");
if(NULL == fgets(buf,BUF_SIZE,stdin)) // get the input
return 0;
index = sizeof(input)/sizeof(input_type);
while(index-- > 0)
{
res = strncmp(buf,input[index].str,input[index].size); // find the commond
if(res == 0)
{
switch(index)
{
case 0: // exec exit commond
flag = 0;
break;
case 1: // exec cd commond
cds(buf);
break;
case 2: // exec ls commond
lss(buf);
break;
default:
printf("can 's \n");
break;
}
index = -1; // if find the commond, stop finding
}
}
if(index == -1)
printf("can't find commond: %s ",buf);
}
return 0;
}
{
char buf[BUF_SIZE];
int res = 1;
int flag = 1;
int index = 0;
while(flag) // do this untial input exit commond
{
printf("|->");
if(NULL == fgets(buf,BUF_SIZE,stdin)) // get the input
return 0;
index = sizeof(input)/sizeof(input_type);
while(index-- > 0)
{
res = strncmp(buf,input[index].str,input[index].size); // find the commond
if(res == 0)
{
switch(index)
{
case 0: // exec exit commond
flag = 0;
break;
case 1: // exec cd commond
cds(buf);
break;
case 2: // exec ls commond
lss(buf);
break;
default:
printf("can 's \n");
break;
}
index = -1; // if find the commond, stop finding
}
}
if(index == -1)
printf("can't find commond: %s ",buf);
}
return 0;
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询