#include <stdio.h>
#define NUMBER 5

typedef struct{
	int id;
	int weight;
	int height;
}Body;

void swap(Body *x,Body *y);

int main(void) {
	Body data[]={{1,65,169},
				 {2,73,170},
				 {3,59,161},
				 {4,79,175},
				 {5,55,168},
	};
	
	for(int i=0;i<5;i++){
		for(int j=0;j<4;j++){
		if(data[j].height<=data[j+1].height){
			swap(&data[j],&data[j+1]);
		}
	}
	}
	
	for(int i=0; i<NUMBER;i++){
		printf("id : %d, weight : %d, height : %d\n",data[i].id,data[i].weight,data[i].height);
	}
	return 0;
}


void swap(Body *x,Body *y){
 
	 Body w = *x;
	*x = *y;
	*y = w;
}