C語言代碼塊

一、求某某範圍內的閏年 #include<stdio.h> main() { int i; for ( i = 0; i <= 5000; i++) { if ((i%4==0 && i%100!=0) || i%40==0) printf("%d\n",i); } return 0; } 如圖:是求0到5000年內的閏年 非整百年:能被4整除的爲閏年。(如2004年就
相關文章
相關標籤/搜索