89.7k views
0 votes
Write the Pseudocode for a program that will convert the temperature in Celsius to the temperature in Fahrenheit.

The formula, for this calculation is illustrated as:

By HAND, calculate the expected value for the conversions:

0 Celsius

50 Celsius

100 Celsius

Write the program temperature.cpp to perform the conversion. What results do you get if you provide the following input?

0

50

100

Adjust your program until the values are the same as your calculation by hand.

1 Answer

5 votes

Final answer:

To convert temperature from Celsius to Fahrenheit, you can use the formula F = (C * 9/5) + 32. Here is the pseudocode for the program: 1. Ask the user to input the temperature in Celsius. 2. Convert the input to a number. 3. Calculate the temperature in Fahrenheit using the formula mentioned above. 4. Print the calculated temperature in Fahrenheit.

Step-by-step explanation:

To convert temperature from Celsius to Fahrenheit, you can use the formula:

F = (C * 9/5) + 32

Where F is the temperature in Fahrenheit and C is the temperature in Celsius.

Here is the pseudocode for the program:

  1. Ask the user to input the temperature in Celsius.
  2. Convert the input to a number.
  3. Calculate the temperature in Fahrenheit using the formula mentioned above.
  4. Print the calculated temperature in Fahrenheit.

When you provide the input values 0, 50, and 100, you should get the following results respectively: 32.0°F, 122.0°F, and 212.0°F.

User Jarek Rozanski
by
8.0k points