Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
134027 李昱龙 08有几个闰年 C++ Compile Error 0 MS 0 KB 274 2025-10-25 14:29:08

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c,d; cin>>a>>b>>c; d = 0 if(a%4==0&&a%100!=0||a%400==0){ d = d+1; }if(b%4==0&&b%100!=0||b%400==0){ d = d+1; }if(c%4==0&&c%100!=0||c%400==0){ d = d+1; } cout<<d<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:2: error: expected ';' before 'if'
  if(a%4==0&&a%100!=0||a%400==0){
  ^
Main.cc:9:12: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  }if(b%4==0&&b%100!=0||b%400==0){
            ^
Main.cc:11:12: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  }if(c%4==0&&c%100!=0||c%400==0){
            ^