???????ж??????????????????????bool???????????????leap=true??????????leap=false?????ж?leap?????棬????棬???????
#include<iostream>
using namespace std;
int main()
{ int year;
bool leap;
for(year=1000;year<=2000;year++)
{if (((year%4==0)&&(year%100!=0))||(year%400==0))
leap=true;
else
leap=false;}
if(leap)
cout<<year<<" "<<endl;
}
return 0;}