📄 leap.ksh
字号:
#!/bin/ksh# Script name: leap.ksh# Assume the user enters the year on the command line # when they execute the script.if [ $# != 1 ]then echo "You need to enter the year." exit 1fi year=$1if (( (year % 400) == 0 ))then print "$year is a leap year!"elif (( (year % 4) == 0 ))then if (( (year % 100) != 0 )) then print "$year is a leap year!" else print "$year is not a leap year." fielse print "$year is not a leap year."fi
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -