Question: Because there are only two possibilities for conversion of temperature, it's relatively easy to convert between Celsius and Fahrenheit temperature units. Because there are many

Because there are only two possibilities for conversion of temperature, it's relatively easy to convert between Celsius and Fahrenheit temperature units. Because there are many more units in common use, converting between pressure units is more challenging. Here are some of the possibilities along with the number of Pascals represented by each. Unlt, U tof Pa, Cl 6894.76 101325 3376.85 98066.5 248.843 Index, i Descrlptlon or usage Tire pressure, above ambient pressure Used for high pressure experiments Atmospheric pressure given by weatherperson Europe metric unit in situations where psi used in U.S Used in heating/ventilating systems in buildings Standard SI (metric) unit of psl 2 atm inHg inH20 Pa bar dyne/cm2 ftH20 mmHg pressure. 1 N/ requently used by meterologists Older scientific pressure unit from the CGS system 0.1 2988.98 133.322 133.322 5894760 9 Used in laboratory pressure measurements 10 Same as 1 mmHg but used in vacuum measurement 12 Used in structural engineerin The information in the table can be used to implement a conversion calculation. One way to do this is to store both the units and the corresponding number of the Pascals in individual arrays with the subscripts corresponding to each entry. For example, U(1)psi' C(1)-6894.76 U(2) 'atm , C(2)-101325 The conversion from one unit to another could then be computed with the following general formula: where Pg= given pressure, Pd= desired pressure.,-the index of the desired unit, and i= the index of the given unit. So, the conversion from one unit to another involves first determining the indices corresponding to the given and the desired units and then implementing the conversion equation. Here is a step-by-step algorithm to do this: 1. Assign the values of the unit, U, and conversion, C, arrays. 2. Have the user select the input units by entering the value ofi. If the user enters a correct value within the range, 1-12, continue to step 3 If the user enters a value outside the range, display an error message and repeat step 2. 3. Have the user enter the given value of pressure, Pi 4. Have the user select the desired units by entering the value of j If the user enters a correct value within the range 1-12, continue to step 5 If the user enters a value outside the range, display an error message and repeat step 4 5. Use the formula to convert the quantity in input units to its value in the desired output units. 6. Display the original quantity and units and the output quantity and units. 7. Ask if another output result for the same input is desired. If yes, go back to step 4 and continue from there. If no, go on to step 8 8. Ask if another conversion is desired. If yes, go back to step 2 and continue from there. If no, end of algorithm
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
