#include <stdio.h>

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

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

int main(void) {
    int i, j;
    int n = 5;

    struct Body a[5] = {
        {1, 65, 169},
        {2, 73, 170},
        {3, 59, 161},
        {4, 79, 175},
        {5, 55, 168}
    };

    for (i = 0; i < n - 1; i++) {
        for (j = i + 1; j < n; j++) {
            if (a[i].height < a[j].height) {
                swap(&a[i], &a[j]);
            }
        }
    }

    printf("ID 体重 身長\n");
    for (i = 0; i < n; i++) {
        printf("%d  %d  %d\n", a[i].id, a[i].weight, a[i].height);
    }

    return 0;
}