Chapter 1: Problem 15
Some versions of our program for calculating the formula (1.2) are listed below. Determine which versions that will not work correctly and explain why in each case. $$ \begin{array}{llll} \mathrm{C}=21 ; & \mathrm{F}=9 / 5 * \mathrm{C}+32 ; & & \text { print } \mathrm{F} \\ \mathrm{C}=21.0 ; & \mathrm{F}=(9 / 5) * \mathrm{C}+32 ; & & \text { print } \mathrm{F} \\ \mathrm{C}=21.0 ; & \mathrm{F}=9 * \mathrm{C} / 5+32 ; & & \text { print } \mathrm{F} \\ \mathrm{C}=21.0 ; & \mathrm{F}=9 . *(\mathrm{C} / 5 \cdot 0)+32 ; & & \text { print } \mathrm{F} \\ \mathrm{C}=21.0 ; & \mathrm{F}=9.0 * \mathrm{C} / 5 \cdot 0+32 ; & & \text { print } \mathrm{F} \\ \mathrm{C}=21 ; & \mathrm{F}=9 * \mathrm{C} / 5+32 ; & & \text { print } \mathrm{F} \\ \mathrm{C}=21.0 ; & \mathrm{F}=(1 / 5) * 9 * \mathrm{C}+32 ; & & \text { print } \mathrm{F} \\ \mathrm{C}=21 ; & \mathrm{F}=(1 . / 5) * 9 * \mathrm{C}+32 ; & & \text { print } \mathrm{F} \end{array} $$
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.