請問我的代碼哪里有錯誤?
#include
int main() { ? ? ? ? ?int height = 185; ? ?int x = 180; ? ?if (height >= x) ? ?{ ? ? ? ?printf("%s\n", "恭喜小明可以參加?;@球隊(duì)"); ? ?} ? ? ? ? ? ? ? ? return 0; } 這個哪里有錯誤??#include
int main() { ? ? ? ? ?int height = 185; ? ?int x = 180; ? ?if (height >= x) ? ?{ ? ? ? ?printf("%s\n", "恭喜小明可以參加?;@球隊(duì)"); ? ?} ? ? ? ? ? ? ? ? return 0; } 這個哪里有錯誤??2016-03-24
舉報
2016-04-17
第一行 #include <stdio.h>
if()后面不加;是正確的。
改完放在線編譯器可以調(diào)試出來的
2016-04-15
?if(height >= 180);//補(bǔ)全所有代 ?沒有分號
2016-04-10
#include <stdio.h>
int main()?
{ ? ? ?
? ? int height = 185;
??
? ? if(height >= 180);//補(bǔ)全所有代
{
? ? printf("%s\n" , "恭喜小明可以參加校籃球隊(duì)");
}
? ??
? ??
return 0;
}
2016-03-31
是不是都是在英文輸入法下
2016-03-27
未包含頭文件
2016-03-24
你還沒有進(jìn)行一個判斷