# include
typedef struct a
{
int **arc;
int vexnum;
}table;
void createbiao(table *a)//建立邻接表
void tableplus(table *a,table *b)
{
int i,j
if(a->vexnum!=b->vexnum)
{printf("不能做加法!\n");exit(0);}
for(i=0;i
for(j=0;j
a->arc[i][j]+=b->arc[i][j];
}
void tablejian(table *a,table *b)
{
int i,j
if(a->vexnum!=b->vexnum)
{printf("不能做减法!\n");exit(0);}
for(i=0;i
for(j=0;j
a->arc[i][j]-=b->arc[i][j];
}
void tableplus(table *a,table *b)
{
int i,j,k,usum=0;
if(a->vexnum!=b->vexnum)
{printf("不能做乘法!\n");exit(0);}
for(i=0;i
{
for(k=0;k
{
sum=0
for(j=0;j
sum=arc->arc[i][j]*b->arc[j][k];
a->arc[i][k]=sum;
}
}
}
有问题追问,写写不容易
打酱油,有问题追问