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;i
任务二十一 关于查找和排序的作业
10
分
任务尚未发布或者你没有权限查看任务内容。
任务讨论