#include <stdio.h>

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

void swap(Body *b, Body *c);

int main(void){
    Body a[] = { {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(a[i].height < a[j].height){
                swap(&a[i], &a[j]);
            }
        }
    }
    
    for(int k=0; k<5; k++){
        printf("%d, %d, %d\n", a[k].id, a[k].weight, a[k].height);
    }    
    
    return 0;
}

void swap(Body *b, Body *c)
{
    Body work;
    work = *b;
    *b = *c;
    *c = work;
}
