Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

David James B.

Ignacio

Pseudocode for temperature converter. One for Celsius to Fahrenheit and another one for Fahrenheit to
Celsius.

1. Display choice for conversion (1. Fahrenheit to Celsius, 2. Celsius to Fahrenheit)


2. Read user's choice

3. If user's choice is 1:

1. Read temperature in Fahrenheit (fahrenheit_temp)


2. Convert fahrenheit_temp to Celsius using the formula: celsius_temp = (fahrenheit_temp - 32) * 5/9
3. Print celsius_temp = (fahrenheit_temp - 32) * 5/9
4. Display the converted temperature in Celsius

4. Otherwise if user's choice is 2:


1. Read temperature in Celsius (celsius_temp)
2. Convert celsius_temp to Fahrenheit using the formula: fahrenheit_temp = (celsius_temp * 9/5) + 32
3. Print fahrenheit_temp = (celsius_temp * 9/5) + 32
4. Display the converted temperature in Fahrenheit

You might also like