#include main() { double a,b,c,d,e; scantf("lf%lf%lf%",a,b,c); d=(a+b+c)/3; printf("d=%lf#include main(){ double a,b,c,d,e;scantf("lf%lf%lf%",a,b,c);d=(a+b+c)/3;printf("d=%lf",d);e=d*10;e=d+0.5;e=(int)d;e=d/10;printf("e=%f",e);}哪里错误了 C++6.0
来源:学生作业帮助网 编辑:作业帮 时间:2024/08/26 04:16:19
![#include main() { double a,b,c,d,e; scantf(](/uploads/image/z/5491996-52-6.jpg?t=%23include+main%28%29+%7B+double+a%2Cb%2Cc%2Cd%2Ce%3B+scantf%28%22lf%25lf%25lf%25%22%2Ca%2Cb%2Cc%29%3B+d%3D%28a%2Bb%2Bc%29%2F3%3B+printf%28%22d%3D%25lf%23include+main%28%29%7B+double+a%2Cb%2Cc%2Cd%2Ce%3Bscantf%28%22lf%25lf%25lf%25%22%2Ca%2Cb%2Cc%29%3Bd%3D%28a%2Bb%2Bc%29%2F3%3Bprintf%28%22d%3D%25lf%22%2Cd%29%3Be%3Dd%2A10%3Be%3Dd%2B0.5%3Be%3D%28int%29d%3Be%3Dd%2F10%3Bprintf%28%22e%3D%25f%22%2Ce%29%3B%7D%E5%93%AA%E9%87%8C%E9%94%99%E8%AF%AF%E4%BA%86+C%2B%2B6.0)
#include main() { double a,b,c,d,e; scantf("lf%lf%lf%",a,b,c); d=(a+b+c)/3; printf("d=%lf#include main(){ double a,b,c,d,e;scantf("lf%lf%lf%",a,b,c);d=(a+b+c)/3;printf("d=%lf",d);e=d*10;e=d+0.5;e=(int)d;e=d/10;printf("e=%f",e);}哪里错误了 C++6.0
#include main() { double a,b,c,d,e; scantf("lf%lf%lf%",a,b,c); d=(a+b+c)/3; printf("d=%lf
#include
main()
{ double a,b,c,d,e;
scantf("lf%lf%lf%",a,b,c);
d=(a+b+c)/3;
printf("d=%lf",d);
e=d*10;
e=d+0.5;
e=(int)d;
e=d/10;
printf("e=%f",e);
}哪里错误了 C++6.0他说运行错误
#include main() { double a,b,c,d,e; scantf("lf%lf%lf%",a,b,c); d=(a+b+c)/3; printf("d=%lf#include main(){ double a,b,c,d,e;scantf("lf%lf%lf%",a,b,c);d=(a+b+c)/3;printf("d=%lf",d);e=d*10;e=d+0.5;e=(int)d;e=d/10;printf("e=%f",e);}哪里错误了 C++6.0
第四行是scanf不是scantf 而且后面还少了取地址符&