Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
159043 李泽曦 08有几个闰年 C++ Compile Error 0 MS 0 KB 549 2026-08-25 11:58:48

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int year,year1,year2,s; cin>>year>>year1>>year2; s=0 if(year%400==0&&year%4==0&&year%100!=0){ s=s+1; } if(year1%400==0&&year1%4==0&&year1%100!=0){ s=s+1; } if(year2%400==0&&year2%4==0&&year2%100!=0){ s=s+1; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:11:5: error: expected ';' before 'if'
     if(year%400==0&&year%4==0&&year%100!=0){
     ^