: PROGRAM: PYTHAG : Prompt A, B :Fix 2

�ã
: (A2 +B2) �¨ C :Disp "C=",C : Float
Choose the three true options concerning this program.
Options
A)
The program can be used to find the length of the hypotenuse of a
right-angled triangle.
B)
The program can be used to find the smallest angle in a right angled
triangle.
C)
If 5 and 12 are input for A and B, then C = 13 is displayed.
D)
If 5 and 12 are input for A and B, then C = 13.00 is displayed.
E)
If negative numbers are entered for A and B, then an error message
will be displayed.
F)
If negative numbers are entered for A and B, then the value of C will
also be negative.
G)
The command Fix 2 is necessary because 2 numbers are input.
H)
The command Fix 2 sets the number of decimal places displayed to 2.
21

A, D, H

To determine the correct options concerning the given program, let's analyze each statement:

A) The program can be used to find the length of the hypotenuse of a right-angled triangle.
This statement is true. The Pythagorean theorem is used to find the length of the hypotenuse in a right-angled triangle, and the formula (A^2 + B^2) = C is implemented in the program.

B) The program can be used to find the smallest angle in a right-angled triangle.
This statement is false. The program does not involve any calculations or logic to find angles. It solely focuses on finding the length of the hypotenuse (C).

C) If 5 and 12 are input for A and B, then C = 13 is displayed.
This statement is true. By substituting the values of A = 5 and B = 12 into the Pythagorean theorem formula, we get (5^2 + 12^2) = 169, which simplifies to C = 13.

D) If 5 and 12 are input for A and B, then C = 13.00 is displayed.
This statement is false. The program does not explicitly mention displaying the result with decimal places. Therefore, only the whole number value of C would be displayed.

E) If negative numbers are entered for A and B, then an error message will be displayed.
This statement is false. The given program does not include any error handling or checks for negative input values, so it will not display an error message.

F) If negative numbers are entered for A and B, then the value of C will also be negative.
This statement is false. Regardless of whether the input values are negative or positive, the program uses the absolute values to calculate the square and sum, resulting in a positive value for C.

G) The command Fix 2 is necessary because 2 numbers are input.
This statement is false. The command "Fix 2" is not required in this program. It is used to set the number of decimal places displayed for floating-point numbers, but since the program does not explicitly mention displaying decimal places, this command is unnecessary.

H) The command Fix 2 sets the number of decimal places displayed to 2.
This statement is true. The "Fix 2" command is used to set the number of decimal places displayed to 2. However, as mentioned earlier, since the program does not indicate displaying decimal places, this command is irrelevant.

Based on the explanations provided, the correct options are:
A) The program can be used to find the length of the hypotenuse of a right-angled triangle.
C) If 5 and 12 are input for A and B, then C = 13 is displayed.