码迷,mamicode.com
首页 >  
搜索关键字:闰年脚本    ( 1个结果
闰年脚本
闰年脚本#!/bin/bashecho"pleaseinputayear;"readyearlet"n1=$year%4"let"n2=$year%100"let"n3=$year%400"if[!"n1"-eq0]thenleap=0elif[!"n2"-eq0]thenleap=1elif[!"n3"-eq0]thenleap=0elseleap=1fiif["leap"-eq1]thenecho"$yearisaleapyear!"elseecho"$yearisnotayear!"fi
分类:其他好文   时间:2017-03-08 16:40:35    阅读次数:138
1条  
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!