#include <stdio.h>
 struct Body{
	int ID;
	int weight;
	int height;
};

void swap(struct Body *a, struct Body *b) {
    struct Body temp = *a;
    *a = *b;
    *b = temp;
};
int main(void) {
	struct Body a[5]= {
	{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 = 0; j < 4 - i; j++) {
            if (a[j].height < a[j + 1].height) {
                swap(&a[j], &a[j + 1]);
            }
        }
    }
    for (int i = 0; i < 5; i++) {
        printf("%d,%d,%d\n", a[i].ID, a[i].weight, a[i].height);
    }

    return 0;
}

