#define _CRT_SECURE_NO_WARNINGS 1 #include <stdio.h> #include<stdlib.h> int bissextile(year) { if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) return 1; else return 0; } int main() { int year=0 ; int ret = 0; printf("請輸入年份:"); scanf("%d",&year); printf("\n"); ret = bissextile(year); if (ret == 1) printf("%d是閏年\n", year); else printf("%d不是閏年\n", year); system("pause"); return 0; }