Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
90607 | 梁敖铭 | 闰年的数量 | C++ | Compile Error | 0 MS | 0 KB | 221 | 2024-09-16 09:36:17 |
#include<iostream> using namespace std; void qww(int x,int y){ for(i=x;i<=y;i++){ if(i%4==0&&i%100!=0||i%400==0) s++; } cout<<s; int main(){ int x,y,s,i; cin>>x >>y; qww(); return 0; }
Main.cc: In function 'void qww(int, int)': Main.cc:5:9: error: 'i' was not declared in this scope for(i=x;i<=y;i++){ ^ Main.cc:7:2: error: 's' was not declared in this scope s++; ^ Main.cc:9:7: error: 's' was not declared in this scope cout<