Question: finish code for unsigned operations: the expected output is: echo Running tests... echo output = $ ( . / a . out ) expected _

finish code for unsigned operations: the expected output is: echo "Running tests..."
echo
output=$(./a.out)
expected_output="Please enter a decimal number: 15
Decimal: 15 equal to Binary: 1111"
if [ $?-eq 0] ; then
echo "Pass: Program exited zero"
else
echo "Fail: Program did not exit zero"
exit 1
fi
if ["$output" =="$expected_output" ] ; then
echo "Pass: Output is correct"
else
echo "Expected '$expected_output' but got: $output"
exit 1
fi
echo
echo "All tests passed."
exit 0
finish code for unsigned operations: the expected

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!