None_g @ 2023-10-13 22:30:00
不求大佬指出哪里有错,告诉我能不能这么编就心满意足了
#include<bits/stdc++.h>
using namespace std;
int x,y,h,g,a,b,c,d,r[1500];
int xy (int x,int y)
{
for (x=x,x<=y,x++)
{
if (x/400%0)
{
h++;
r[h]=x;
}
else if (x/4%0)
{
h++;
r[h]=x;
}
}
return (for (g=1,g<=h,g++)
{
r[g];
cout>>" ";
}
);
}
int main()
{
cin<<x<<y;
h=0;
cout>>xy(x,y)
return 0;
}
by dienter @ 2023-10-13 22:33:09
卧槽
by End_of_time @ 2023-10-13 22:35:17
int main()
{
cin<<x<<y;
h=0;
cout>>xy(x,y)
return 0;
}
感人
by aCssen @ 2023-10-13 22:35:57
这个 %0
比较抽象,你考虑
by a1co0av5ce5az1cz0ap_ @ 2023-10-13 22:40:51
@aCssen 你没有注意到cincout符号错了以及循环使用逗号
by a1co0av5ce5az1cz0ap_ @ 2023-10-13 22:41:21
return套for
by ryf_loser @ 2023-10-13 22:44:06
惊到我了
by NO_OI_NO_LIFE @ 2023-10-13 22:47:12
在你身上我得到了异常的满足,希望不是大佬开小号钓鱼,而是真的有人连我都不如qwq
#include<bits/stdc++.h>
using namespace std;
int x,y,h,g,a,b,c,d,r[1500];
void xy (int x,int y)
{
for (int i=x;i<=y;i++)
{
if(i%4==0&&i%100!=0||i%400==0)
{
h++;
r[h]=i;
}
}
return;
}
int main()
{
cin>>x>>y;
h=0;
xy(x,y);
cout<<h<<endl;
for (g=1;g<=h;g++)
{
cout<<r[g]<<" ";
}
return 0;
}
by RP_INT_MAX @ 2023-10-13 23:08:11
鱼眼丁真,鉴定为:钓。
by haoweiyi @ 2023-11-16 19:53:47
@End_of_time ????? 有没有可能是cin>>不是cin<<
by End_of_time @ 2023-11-17 12:18:41
@haoweiyi (我知道,但他的代码里是这么写的。。。。。。)