I am trying to display the Pythagorean Theorem in bash for my son - which should be easy. I need it in function. However the theorem a2 + b2 = c2 is just not making sense here. Don't know what I am doing wrong.
#!/bin/bash
read side_a side_b
hypo=$(( (side_a*side_a) + (side_b*side_b) ))
echo "side: $side_a side: $side_b hypotenuse: $hypo"
$ /tmp/hypo
5 5
side: 5 side: 5 hypotenuse: 50