#include <stdio.h>

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

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

int main(void) {
	Body a[5] = {
		{1, 65, 169},
		{2, 73, 170},
		{3, 59, 161},
		{4, 79, 175},
		{5, 55, 168}
	};
	
	//身長の降順に並び替えると
	int i=0;
	int j=0;
	for(i=0; i<4; i++){
		for (j=i+1; j<5; j++){   //高い人がいないか確認するため
			if(a[i].height < a[j].height){
				swap(&a[i], &a[j]);
			}
		}
	}

for (int i = 0; i < 5; i++) {
	printf("%d, %d, %d\n", a[i].ID, a[i].weight, a[i].height);
}
	return 0;
}

