From 4080aefb0ee4d482e42dc2d949feca7c241bf6ec Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Wed, 16 Sep 2020 11:13:36 -0500 Subject: [PATCH] Add test.sh --- test.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 test.sh diff --git a/test.sh b/test.sh new file mode 100755 index 0000000..e949ce2 --- /dev/null +++ b/test.sh @@ -0,0 +1,29 @@ +# Bash + +gcd() { + if (( $2 > 0 )) + then + echo $( gcd $2 $(( $1 % $2 )) ) + else + echo $1 + fi +} + +echo test + +declare -i N=1000 +declare -a A +for ((i=0;i