求問,哪里錯了?
#include <stdio.h>
int main()?
{
? ? int year = 2014; //今年是2014年
? ? //補全一下代碼
? ? if(year%4==0&&year%100!==0||year%400==0)
? ? {
? ? ? ? printf("%s\n","今年是閏年");
? ? }
? ? else
? ? {
? ? ? ? printf("%s\n","今年是平年");
? ? }
? ??
? ??
? ??
? ??
? ? return 0;
}
2018-08-09
首先你的代碼里有中文全角字符,語句最后的分號注意一下
其次條件語句要沒有歧義,括號區(qū)別一下主次
2018-08-08
因為你的if條件句中有一個@