#include <stdio.h>

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

void swap(Body* data1,Body* data2){
    Body temp = *data1;
    *data1 = *data2;
    *data2 = temp;
}

int main() {
     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 = 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("ID: %d, Weight: %d, Height: %d\n", a[i].id, a[i].weight, a[i].height);
    }
}
