首页 > 其他分享 >判断闰年

判断闰年

时间:2022-10-23 22:09:08浏览次数:51  
标签:判断 return SECURE 闰年 nian printf CRT

#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
int nian;
scanf("%d", &nian);
if (nian % 4 == 0 && nian % 100 != 0 || nian % 400 == 0)
printf("是闰年%d\n", nian);
else
printf("不是闰年%d\n", nian);
return 0;
}

标签:判断,return,SECURE,闰年,nian,printf,CRT
From: https://blog.51cto.com/u_15766378/5787593

相关文章