关于输出的问题
#include<iostream.h>main()
{
long double sum,s1,s2,s3,x0=05,x1=0.6,x2=0.7, x=0.57891,y0=0.47943,y1=0.56464,y2=0.64422;
s1=((x-x1)*(x-x2))/((x0-x1)*(x0-x2))*y0;
s2=((x-x0)*(x-x2))/((x1-x0)*(x1-x2))*y1;
s3=((x-x0)*(x-x1))/((x2-x0)*(x2-x1))*y2;
sum=s1+s2+s3;
cout<<sum<<endl;
}
为什么输出的位数只有6位?