Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
98806 贾雨泽 08有几个闰年 C++ Compile Error 0 MS 0 KB 359 2024-11-23 14:55:59

Tests(0/0):


Code:

#include<iostream> using namespace std; int main(){ int a,b,c,a1,b1,c1; cin>>a>>b>>c; if(a%4==0&&a%100!=0||a%400==0){ a1 = 1; } else{ a1 = 0; } if(a%4==0&&a%100!=0||a%400==0){ b1 = 1; } else{ b1 = 0; } if(a%4==0&&a%100!=0||a%400==0){ c1 = 1; } else{ c1 = 0; } cout<<x+y+z; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:8:11: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  if(a%4==0&&a%100!=0||a%400==0){
           ^
Main.cc:16:11: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  if(a%4==0&&a%100!=0||a%400==0){
           ^
Main.cc:24:11: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
  if(a%4==0&&a%100!=0||a%400==0){
           ^
Main.cc:30:8: error: 'x' was not declared in this scope
  cout<