Skip to content

Instantly share code, notes, and snippets.

@afaqk9394
Created March 5, 2020 01:26
Show Gist options
  • Save afaqk9394/1fdfa3377080be0977e024486177bf1f to your computer and use it in GitHub Desktop.
Save afaqk9394/1fdfa3377080be0977e024486177bf1f to your computer and use it in GitHub Desktop.
#!/bin/bash
echo "Enter the year in YYYY format, followed by [ENTER]:"
read year
if (( ("$year" % 400) == "0" )) || (( ("$year" % 4 == "0") && ("$year" % 100 !=
"0") )); then
echo "Yes, it is"
else
echo "Nope, it is not."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment