Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
100041 袁龙浩 08有几个闰年 C++ Compile Error 0 MS 0 KB 581 2024-12-01 14:44:27

Tests(0/0):


Code:

#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 a,b,c,d=0; cin>>a>>b>>c; if(a%4==0 && a%100!=0 || a%400==0){ d=d+1; } else{ d=d+0; } if(b%4==0 && b%100!=0 || b%400==0){ d=d+1; } else{ d=d+0; } if(c%4==0 && c%100!=0 || c%400==0){ d=d+1; } else{ d=d+0; } cout<<d; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:8:5: error: 'cin' was not declared in this scope
     cin>>a>>b>>c;
     ^
Main.cc:9:15: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
     if(a%4==0 && a%100!=0 || a%400==0){
               ^
Main.cc:15:15: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
     if(b%4==0 && b%100!=0 || b%400==0){
               ^
Main.cc:21:15: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
     if(c%4==0 && c%100!=0 || c%400==0){
               ^
Main.cc:27:5: error: 'cout' was not declared in this scope
     cout<