20分,求助大佬

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

Haidde @ 2024-02-16 21:07:22

#include<stdio.h>
int main()
{
    int x,y,i,t=0,a[2000]={0};
    scanf("%d %d",&x,&y);
    for(i=x;i<=y;i++)
     if(((i%4==0)&&(i%100!=0))||(i%400==0))
      {
         t++;
         a[t]=i;
      }
    printf("%d",t);
    for(i=1;i<=t;i++)
     printf("%d",a[i]);
    return 0;

}

by Super_Ken @ 2024-02-16 21:15:16

大哥,你是不是没加空格。


by Super_Ken @ 2024-02-16 21:16:18

@[Haidde]()


by Super_Ken @ 2024-02-16 21:18:10

而且好像没换行


by Super_Ken @ 2024-02-16 21:20:20

printf("%d\n",t);

|