Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
98461 董海权 08有几个闰年 C++ Compile Error 0 MS 0 KB 440 2024-11-22 19:15:16

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<iomanip> #include<cmath> using namespace std; int main(){ int a,b,c,d; d=0; cin>>a>>b>>c; 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 && bc%100!=0 || c%400==0){ d=d+1; } cout<<d; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:10:15: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
     if(a%4==0 && a%100!=0 || a%400==0){
               ^
Main.cc:13:15: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
     if(b%4==0 && b%100!=0 || b%400==0){
               ^
Main.cc:16:18: error: 'bc' was not declared in this scope
     if(c%4==0 && bc%100!=0 || c%400==0){
                  ^