Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
129937 郦辰希 [在线测评解答教程] 闰年 C++ Compile Error 0 MS 0 KB 267 2025-09-06 18:03:39

Tests(0/0):


Code:

#include <iostream> using namespace std; int main() { int t,n,i; cin>>t; for(i=1;i<=t;i++){ cin>>n if((n%4==0 && n%100!=0) || n%400==0){ cout<<"Yes"<<endl; } else{ cout<<"No"; } } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:9:6: error: expected ';' before 'if'
      if((n%4==0 && n%100!=0) || n%400==0){
      ^
Main.cc:12:6: error: 'else' without a previous 'if'
      else{
      ^