哈希表的一个应用
#include
#include
#include
#define L 50 /*定义哈希表长*/
#define M 47 /*定义p值*/
#define N 30 /*定义名单长*/
char z[22];
struct old{char *name;char *py;int k;};
struct old oldlist[L];/*原始表*/
struct hterm
{ char *name;char *py;
int k;int si;
};
struct hterm hlist[L];/*哈希表*/
int i,adr,sum,d;
char ch1;
float average;
/**********************************/
void chash()
{for (i=0;i
0条评论