Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
66969 伍思语 判断闰年I C++ Compile Error 0 MS 0 KB 241 2024-03-12 19:12:22

Tests(0/0):


Code:

#include<iostream> using namespace std; int main(){ int year; cin>>year; if (year%400==0 || year%4==0 && year%100!=0){ cout<<"leap year"; } else if{ cout<<"not leap year"; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:6:34: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
     if (year%400==0 || year%4==0 && year%100!=0){
                                  ^
Main.cc:9:12: error: expected '(' before '{' token
     else if{
            ^