[英]How Can I Fix the error: expected identifier '(' in C
我不明白我做錯了什么我已經搜索了幾個在線參考資料,但仍然無法弄清楚我做錯了什么。 這是我的代碼
#include <cs50.h>
#include <stdio.h>
int x = 5;
int y=get_int("ENTER DIGIT HERE\n");
if (x>y) {
printf("HI\n");
}else{
printf("BYE\n");
}
基本上你想要這個:
#include <cs50.h>
#include <stdio.h>
int main(void) // <<<< your code must be in the main function
{
int x = 5;
int y=get_int("ENTER DIGIT HERE\n");
if (x>y) {
printf("HI\n");
} else {
printf("BYE\n")
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.