求助!怎样让程序运行完成后不自动关闭?
每次看不到最后输出的信息,一闪就没了,代码给上,请帮我修改后一起发给我,谢谢了。程序代码:
#include<stdio.h> #define HEG 0.54 float height(float father, float mother); int main() { float father; float mother; float son; printf("请输入父亲的身高:\n"); scanf("%f",&father); printf("请输入母亲的身高:\n"); scanf("%f",&mother); son=height(father,mother); printf("预测儿子身高:"); printf("%.2f\n",son); return 0; } float height(float father, float mother) { float son =(father+mother)*HEG; return son; }