输入身高体重,求体脂率源代码如下#include <stdio.h> int main() { float height,weight,index; printf("请输入身高(m),体重(kg):\n"); scanf("%f%f",&height,&weight); index=weight/(height*height); printf("体重指数为:%.2f\n",index); return 0; }