任务二十一 关于查找和排序的作业
10
丁蕾蕾
开始于 2018-01-08 09:47
251 89 84
已截止

任务尚未发布或者你没有权限查看任务内容。

任务讨论
4-张晓

1. typedef struct{int key; Elemtype; } typedef struct BiTnode{ Elemtype data; BiTnode*lchild,*rchild; }BiTNode, *BiTree; void Com(int t,int x,int &a,int &b {if(t) if(x==t->data.key ) {Out( t -> lchild, x, a, b ); Out( t -> rchild, x, a, b );} else if( x < t->data.key ) {b = t -> data.key;Out( t -> lchild, x, a, b );} else {a = t -> data.key; Out( t -> rchild, x, a, b );} } void OutX(BiTree t, KeyType x, KeyType &a, KeyType &b) } { a = ''; Out( t, x, a, b ); } 2.#define N 5 #include "stdio.h" struct student { int num; int score; }; struct student s[N],temp; void input() { int i; for(i=0;is[j].score) {temp=s[i]; s[i]=s[j]; s[j]=temp; } } output(); }