找不出哪有问题,求解
#include <stadio.h>
int main()
{ int a = 1;
b = 2;
c = 3;
double result;
result = a + b* c
printf("%f",result);
return 0;
}
hello.c:1:20: fatal error: stadio.h: No such file or directory #include ^ compilation terminated.
#include <stadio.h>
int main()
{ int a = 1;
b = 2;
c = 3;
double result;
result = a + b* c
printf("%f",result);
return 0;
}
hello.c:1:20: fatal error: stadio.h: No such file or directory #include ^ compilation terminated.
2020-10-21
hello.c:1:20: fatal error: stadio.h: No such file or directory #include ^ compilation terminated.
1、这里提示你:stadio这个单词写错了,是stdio 。
2、 int a,b,c ; //你没有事先声明。
2、result = a + b* c //后面要有个分号“;”结尾。
3、printf("%f",result); //标准点是printf("%f\n", result);你的缺少了"\n"回车换行符,当然,不要也可以运行。
---------改正如下----------你的答案是7,先乘除,后加减,2*3=6 , 6+1=7
#include <stdio.h>
int main()
{
int a,b,c;
double result;
a = 1;
b = 2;
c = 3;
result = a + b * c ; //在这里体验哦~
printf("%f\n", result);
return 0;
}
举报