199 : 구조체 - 형성평가5
·
코테 문제 풀이/정올
C #include struct info{ char name[20]; int a,b,c; int sum;}; main(){ int n,i,j; scanf("%d",&n); struct info p[n]; struct info tmp; for(i=0;i
198 : 구조체 - 형성평가4
·
코테 문제 풀이/정올
C #include typedef struct info{ int height; double weight;}I; main(){ I mom; I dad; I me; scanf("%d%lf",&mom.height,&mom.weight); scanf("%d%lf",&dad.height,&dad.weight); me.height=(mom.height+dad.height)/2+5; me.weight=(mom.weight+dad.weight)/2-4.5; printf("height : %dcm\n",me.height); printf("weight : %.1lfkg",me.weight);}Colored by Color Scriptercs 출처 : www.jungol.co.kr/bbs/board.php?bo_table=..
197 : 구조체 - 형성평가3
·
코테 문제 풀이/정올
C #include struct point{ int x; int y; int x2; int y2;}; main(){ struct rectangle{ struct point a; struct point b; }; struct rectangle r; scanf("%d%d%d%d",&r.a.x,&r.a.y,&r.a.x2,&r.a.y2); scanf("%d%d%d%d",&r.b.x,&r.b.y,&r.b.x2,&r.b.y2); int minx,maxx,miny,maxy; minx=r.a.x
196 : 구조체 - 형성평가2
·
코테 문제 풀이/정올
C #include #include typedef struct{ char name[50]; char num[50]; char add[50]; }I; main(){ I a[3]; int i,j; char b[50]="zz"; for(i=0;i
618 : 구조체 - 자가진단6
·
코테 문제 풀이/정올
C #include #include typedef struct{ char name[20]; int height; double weight; }info; main(){ info a[5]; int i,j; for(i=0;i
617 : 구조체 - 자가진단5
·
코테 문제 풀이/정올
C #include typedef struct { char name[20]; int height;}info; main(){ info a[5]; int i,flag=0,min=300; for(i=0;i