#include <stdio.h>
struct Body{
int id;
int height;
int weight;
double bmi;
};
int main(void)
{
struct Body data[]={{1,170,60},{2,150,50},{3,160,56},{4,180,70}};
for(int i=0;i<4;i++){
data[i].bmi=data[i].weight/(data[i].height/100)/(data[i].height/100);
printf("id %d :%lf\n",data
[i
].
id,data
[i
].
bmi); }
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgpzdHJ1Y3QgQm9keXsKaW50IGlkOwppbnQgaGVpZ2h0OwppbnQgd2VpZ2h0Owpkb3VibGUgYm1pOwp9OwoKaW50IG1haW4odm9pZCkKewpzdHJ1Y3QgQm9keSBkYXRhW109e3sxLDE3MCw2MH0sezIsMTUwLDUwfSx7MywxNjAsNTZ9LHs0LDE4MCw3MH19Owpmb3IoaW50IGk9MDtpPDQ7aSsrKXsKZGF0YVtpXS5ibWk9ZGF0YVtpXS53ZWlnaHQvKGRhdGFbaV0uaGVpZ2h0LzEwMCkvKGRhdGFbaV0uaGVpZ2h0LzEwMCk7CnByaW50ZigiaWQgJWQgOiVsZlxuIixkYXRhW2ldLmlkLGRhdGFbaV0uYm1pKTsKfQoJCglyZXR1cm4gMDsKfQo=