找不出哪有問題,求解
#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-27
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;
}
2020-10-21
int a=1那行要在大括號下一行才能正常運行