C语言-判断闰年案例

代码:

#include <stdio.h>
main()
{
	int year;
	scanf("%d",&year);
if(year%4==0&&year%100!=0||year%400==0)
printf("闰年");
else
printf("平年");
}

 

运行结果为:

C语言-判断闰年案例

给TA打赏
共{{data.count}}人
人已打赏
C语言课堂笔记

C语言-输出被3或5整除的数字

2021-10-22 9:30:36

C语言课堂笔记

两次运行程序,键盘上分别输入3,2输出结果是

2021-11-9 10:57:19

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索

Warning: error_log(/www/wwwroot/www.wenlk.com/wp-content/plugins/spider-analyser/#log/log-0719.txt): failed to open stream: No such file or directory in /www/wwwroot/www.wenlk.com/wp-content/plugins/spider-analyser/spider.class.php on line 2900