Skip to content

Instantly share code, notes, and snippets.

@kolodziej
Created January 26, 2014 13:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kolodziej/8632365 to your computer and use it in GitHub Desktop.
Save kolodziej/8632365 to your computer and use it in GitHub Desktop.
#!/bin/bash
a=$1
b=$2
c=$3
istnieje=false
if [ $(($a+$b)) -gt $c ]; then
if [ $(($b+$c)) -gt $a ]; then
if [ $(($c+$a)) -gt $b ]; then
istnieje=true
fi
fi
fi
if $istnieje; then
echo "Trojkat o bokach $a, $b, $c istnieje!"
else
echo "Trójkąt o bokach $a, $b, $c nie istnieje!"
fi
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment