[原创]请看看?为什么最后没结果?
#include "stdio.h"#include "conio.h"
main()
{int leap,y=2000;
while(y<=2100)
{if(y%4!=0)leap=0;
else if(y%100!=0)leap=1;
else if(y%400==0)leap=1;
else leap=0;
y=y+1;}
if(leap)printf("%d is leap",y);
else printf("%d is notleap",y);
getch();
}
运行后,没结果?为什么?
[此贴子已经被作者于2005-2-18 17:13:38编辑过]