piaopiao1234
#include <>#include <>#define ASK_OP(response) puts("INPUT O = IN Ordinary V = IN VIP Q = QUIT");response = getch();typedef struct _cus{ int no; char type; int type_num; struct _cus *next; }customer; int main(int argc, char *argv[]){ customer * phead = NULL, *pcur = NULL, *ptail = NULL; int i,j; char ch; ASK_OP(ch); while(('Q' != ch) && ('q' != ch)) { if('o' == ch || 'O' == ch) { if(NULL == phead) { if(NULL == (phead = (customer *)malloc(sizeof(customer))))return ; phead->no = 1; phead->type = 'o'; phead->type_num = 0; phead->next = NULL; pcur = phead; } else { i=0; //记录类型为 Ordingary 的个数 ptail = phead; while(!(NULL == ptail->next)) { if(ptail->type == 'o') i = ptail->type_num; ptail = ptail->next; } if(ptail->type == 'o') i = ptail->type_num; if(NULL == (pcur = (customer *)malloc(sizeof(customer)))) return ; ptail->next = pcur; pcur->no = ptail->no+1; pcur->type = 'o'; pcur->type_num = i+1; pcur->next = NULL; } printf("\n%d Ordinary %d 前面有%d人等待\n",pcur->no,pcur->type_num,pcur->no-phead->no); } if('v' == ch || 'V' == ch) { if(NULL == phead) { if(NULL == (phead = (customer *)malloc(sizeof(customer)))) return ; phead->no = 1; phead->type = 'v'; phead->type_num = 0; phead->next = NULL; pcur = phead; } else { i=0; //记录类型为 Vip 的个数 ptail = phead; while(!(NULL == ptail->next)) { if(ptail->type == 'v') i = ptail->type_num; ptail = ptail->next; } if(ptail->type == 'v') i = ptail->type_num; if(NULL == (pcur = (customer *)malloc(sizeof(customer)))) return ; ptail->next = pcur; pcur->no = ptail->no+1; pcur->type = 'v'; pcur->type_num = i+1; pcur->next = NULL; } printf("\n%d VIP %d 前面有%d人等待\n",pcur->no,pcur->type_num,pcur->no-phead->no); } ASK_OP(ch); } printf("\n GOOD bye"); system("PAUSE"); return 0;}
这个设计的范围太广了。我这里有其他 的题目,看看如何。
四大行即中国四大银行,其包括中国工商银行、中国农业银行、中国银行、中国建设银行(工、农、中、建),亦称中央四大行中国建设银行成立于1954年10月1日(当时行名
商业银行经营管理问题研究论文 当代,论文常用来指进行各个学术领域的研究和描述学术研究成果的文章,简称之为论文。下面是我整理的商业银行经营管理问题研究论文,一起来
软件工程毕业论文的写法如下: 题目设置不合理,类别与层次不清晰,选题匹配效果差。学生的毕业设计课题一般都按照指导老师的研究方向和实际工程项目提供,但每年真正来源
#include #include #define ASK_OP(response) puts("INPUT O = IN Ordinary V = IN V