Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
105409 陈奕涵 08有几个闰年 C++ Compile Error 0 MS 0 KB 449 2025-01-13 15:28:05

Tests(0/0):


Code:

#include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int a,s,d,tyui; tyui=0; cin>>a>>s>>d; if((a%4==0)&&(a%100!=0)||(a%400==0)){ tyui++; } if((s%4==0)&&(s%100!=0)||(s%400==0)){ tyui++; } if((d%4==0)&&(d%100!=0)||(d%400==0)){ tyui++; } cout<<tyui; return 0; }


Run Info:

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