判断1000年---2000年之间的闰年

xiaoxiao2021-02-28  30

#include <stdio.h> #include <windows.h> int main() { int i = 1000; for (; i <= 2000; i++) { if (i % 4 == 0 && i % 100 != 0 || i % 400 == 0) printf("%d\n", i); } system("pause"); return 0;

}

转载请注明原文地址: https://www.6miu.com/read-1749983.html

最新回复(0)