#include
int main() {
float t, h;
printf("时间t=\n");
scanf("%f", &t);
h = 0.5 * g * t * t ;
printf("下落距离h=%f", &h);
return 0;
}
最后的打印输出不需要添加取地址符号&
printf中&h改为h
#define g 10
#include <stdio.h>
int main() {
float t, h;
printf("时间t=\n");
scanf("%f", &t);
h = 0.5 * g * t * t ;
printf("下落距离h=%f", h);
return 0;
}
各位大佬知道不