求助大佬,我这样为什么过不了

P5737 【深基7.例3】闰年展示

codingfresher @ 2022-10-04 22:21:21


#include<iostream>
using namespace std;
int main()
{
    int begin,end,k;
    cin >> begin;
    cin >> end;
    cout << (end-begin)/4 << endl;
    for(k=begin;k>=begin&k<=end;k++)
    {
        if(k%4==0&k%100!=0||k%400==0)
        {
            cout << k << "\t";
        }
    }
    return 0;
}

by pengzihao @ 2022-10-04 22:41:37

cout << (end-begin)/4 << endl;

错了


|