Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
83970 刘泽熙 闰年的数量 C++ Compile Error 0 MS 0 KB 277 2024-07-15 10:44:39

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; bool isrummian(int year){ if(year%4==0&&year%100!==0||year%400){ retrun true; }else{ retrun false; } } int main(){ int x,y,sun=0; cin>>x>>y; for(int i=x;i<=y;i++){ if(isrunnian(i)){ sum++; } } }


Run Info:

Main.cc: In function 'bool isrummian(int)':
Main.cc:4:26: error: expected primary-expression before '=' token
  if(year%4==0&&year%100!==0||year%400){
                          ^
Main.cc:5:3: error: 'retrun' was not declared in this scope
   retrun true;
   ^
Main.cc:7:3: error: 'retrun' was not declared in this scope
   retrun false;
   ^
Main.cc:9:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
Main.cc: In function 'int main()':
Main.cc:14:17: error: 'isrunnian' was not declared in this scope
   if(isrunnian(i)){
                 ^
Main.cc:15:4: error: 'sum' was not declared in this scope
    sum++;
    ^
Main.cc:11:10: warning: unused variable 'sun' [-Wunused-variable]
  int x,y,sun=0;
          ^