From 9c36a48fd134576264d6a6e88ba9b4fd550ce34c Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Wed, 24 Jan 2024 08:16:47 -0800 Subject: [PATCH] Improve 2011/hou/try.sh --- 2011/hou/try.sh | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/2011/hou/try.sh b/2011/hou/try.sh index 6f7519e06..4cc3d65e8 100755 --- a/2011/hou/try.sh +++ b/2011/hou/try.sh @@ -15,32 +15,34 @@ make CC="$CC" all >/dev/null || exit 1 # clear screen after compilation so that only the entry is shown clear -read -r -n 1 -p "Observe how this one is in the code, both the equation and the answer: " -echo "$ ./hou '11/26+222/31'" 1>&2 +echo "Observe how this one is in the code, both the equation and the answer: " 1>&2 +read -r -n 1 -p "Press any key to run: ./hou '11/26+222/31': " +echo 1>&2 ./hou '11/26+222/31' echo 1>&2 -read -r -n 1 -p "Press any key to continue: " -echo "$ ./hou 'log((21701-19937)-(23209-21701))/log(2)'" 1>&2 +read -r -n 1 -p "Press any key to run: ./hou 'log((21701-19937)-(23209-21701))/log(2)': " +echo 1>&2 ./hou 'log((21701-19937)-(23209-21701))/log(2)' echo 1>&2 -read -r -n 1 -p "Press any key to continue: " echo "$ ./hou 'sin(1.5708)+0.04321+log(sqrt(exp(1*1*1)))+(1+2*3)-0.4-0.6+(4+6)*(2-1+2*3)-tan(0.785398)+2*10/3*6*sqrt(16/2/2)*10+10000-1000'" 1>&2 +read -r -n 1 -p "Press any key to continue: " +echo 1>&2 ./hou 'sin(1.5708)+0.04321+log(sqrt(exp(1*1*1)))+(1+2*3)-0.4-0.6+(4+6)*(2-1+2*3)-tan(0.785398)+2*10/3*6*sqrt(16/2/2)*10+10000-1000' echo 1>&2 -read -r -n 1 -p "Press any key to continue: " -echo "$ ./hou '1+2*3'" 1>&2 +read -r -n 1 -p "Press any key to run: ./hou '1+2*3': " +echo 1>&2 ./hou '1+2*3' echo 1>&2 -read -r -n 1 -p "Press any key to continue: " -echo "$ ./hou '(1+2)*3'" 1>&2 +read -r -n 1 -p "Press any key to run: ./hou '(1+2)*3': " +echo 1>&2 ./hou '(1+2)*3' echo 1>&2 -read -r -n 1 -p "Press any key to continue: " -echo "$ ./hou 'a calculator expression -- see the C Code for details'" 1>&2 +read -r -n 1 -p "Press any key to run: ./hou 'a calculator expression -- see the C Code for details': " +echo 1>&2 ./hou 'a calculator expression -- see the C Code for details' echo "Now answer: what does the last one mean? Can you get it to report something else?" 1>&2