#include <stdio.h>

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

void swap(list *a,list *b);

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

void swap(list *a,list *b) {
	list w;
	w = *a;
	*a = *b;
	*b = w;
}
