Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
103751 | 王仲炜 | 今年的第几天 | C++ | Compile Error | 0 MS | 0 KB | 677 | 2024-12-29 15:07:56 |
#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 i,a,b,c,s=0; cin>>a>>b>>c; for(i=1;i<=b-1;i++) { if(i==1||i==3||i==5||i==7||i==8||i==10||i==12||) s+=31; else if(i==2) { if(a%4==0&&a%100!=0||a%400==0) s+=29; else s+=28; else s+=30; } } cout<<S+c; return 0; }
Main.cc: In function 'int main()': Main.cc:13:56: error: expected primary-expression before ')' token if(i==1||i==3||i==5||i==7||i==8||i==10||i==12||) ^ Main.cc:17:26: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if(a%4==0&&a%100!=0||a%400==0) ^ Main.cc:21:9: error: expected '}' before 'else' else ^ Main.cc: At global scope: Main.cc:25:5: error: 'cout' does not name a type cout<