这段简单的C语言哪错了??
这段简单的C语言哪错了??怎么改.要用一个函数读个双精度的数 送到main中;
#include <stdio.h>
double read()
{double i;
scanf("%f",i);
return i;}
main()
{double a;
a=read();
printf("%f",a);}
运行后出现scanf:floating point formats not linked Abnormal program termination
参考答案:#include <stdio.h>
double read()
{
double i;
scanf("%lf",&i);//修正1处
return i;
}
main()
{
double a;
a=read();
printf("%lf",a); //修正2处
}
召唤皮皮出来解释,嘿嘿