不明白,帮个忙吧,一个小程序
#include "stdio.h"float add( int x,int y)
{
float z;
z=x+y;
return z ;
}
void main()
{
float a=2.1,b=2.3,c;
c=add(a,b);
printf("%3f\n",c);
return 0;
}运行后是4.0000,为什么小数部分没了,要想得到4.4000该怎么该啊.急啊
2008-05-09 11:12
2008-05-09 12:09
2008-05-09 13:04
2008-05-09 13:13