闰年脚本
#!/bin/bash echo "please input a year; " read year let " n1 = $year % 4 " let "n2 = $year % 100" let "n3 = $year % 400" if [ ! "n1" -eq 0 ] then leap = 0 elif [ ! "n2" -eq 0 ] then leap = 1 elif [ ! "n3" -eq 0 ] then leap = 0 else leap = 1 fi if [ "leap" -eq 1 ] then echo "$year is a leap year!" else echo "$year is not a year!" fi
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。