Answers for "leap year shell script"

0

leap year shell script

echo -n "Enter year (YYYY): "
read y
a = 'expr $y%4'
b = 'expr $y%100'
c = 'expr $y%400'
if[$a -eq 0 -a $b -ne - -o $c -eq 0]
then 
echo "$y is leap year"
else
echo "$y is not a leap year"

fi
Posted by: Guest on August-10-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language