616 : 구조체 - 자가진단4
·
코테 문제 풀이/정올
C #include struct point { int x; int y; }; main(){ struct triangle{ struct point a; struct point b; struct point c; }; struct triangle t; scanf("%d%d",&t.a.x,&t.a.y); scanf("%d%d",&t.b.x,&t.b.y); scanf("%d%d",&t.c.x,&t.c.y); printf("(%.1lf, %.1lf)",(double)(t.a.x+t.b.x+t.c.x)/3,(double)(t.a.y+t.b.y+t.c.y)/3); } Colored by Color Scripter cs 출처 : www.jungol.co.kr/bbs/board.php?bo_table=pbank&wr_id..