2. ´ÙÀ½ ÇÁ·Î±×·¥ÀÇ Ãâ·ÂÀ» ½á¶ó. #include struct point { int x; int y; }; /* ÀÎÀÚ Àü´Þ ¹æ½Ä ÁÖÀÇ */ void findCenterPoint(struct point p,struct point q,struct point r) { p.x = (q.x + r.x) / 2; p.y = (q.y + r.y) / 2; } void printPoint(char *name,struct point p) { printf("%s = (%d,%d)\n",name,p.x,p.y); } main() { struct point a; struct point b; struct point c; a.x = 10; a.y = 10; b.x = 20; b.y = 30; c.x = 0; c.y = 0; findCenterPoint(c,a,b); printPoint("c",c); }