• 2022-06-09
    中国大学MOOC: 下面程序 struct point{ float x,y,z;};struct point mid(struct point p1,struct point p2) { struct point m; m.x=(p1.x+p2.x)/2; m.y=(p1.y+p2.y)/2; m.z=(p1.z+p2.z)/2; return m;}int main(){ struct point p1={1,2,3},p2,p3={0,0,0};; p2=p1; p3=mid(p1,p2); printf(%f,p3.x);}执行结果为