Last active
January 29, 2016 13:41
-
-
Save stallemanden/f89fe94077954f1dda89 to your computer and use it in GitHub Desktop.
BashUligeTal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo -n "Tal mellem 0 og 20: " | |
read NUM1; | |
if [ $(($NUM1%2)) -eq 0 ]; | |
then | |
ulige=0; | |
else | |
ulige=1; | |
fi | |
case $ulige in | |
0) echo "Lige tal";; | |
1) echo "Ulige tal";; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment