2.#include<stdio.h>
int fun(int n)
{
if (n % 400 == 0 || (n % 4 == 0 && n % 100 != 0))
printf("Yes!\n");
else
printf("No!\n");
}
int main()
{
int year;
printf("请输入年份:");
scanf_s("%d", &year);
fun(year);
system("pause");
return 0;
}
时间: 2024-10-12 20:17:59