Algorithm to Convert Temperature (Fahrenheit to Celsius and Vice Versa)

Subject: PPS (Programming for Problem Solving)

Contributed By: Sanjay

Created At: February 3, 2025

Question:


Write an Algorithm to Convert Temperature (Fahrenheit to Celsius and Vice Versa)

Explanation Video:

Custom Image

Explanation:

Algorithm:

  1. Start.

  2. Read the temperature and unit (F or C).

  3. If unit is F: 

    • Convert to Celsius: C = (F - 32) / 1.8.

  4. If unit is C: 

    • Convert to Fahrenheit: F = (C * 1.8) + 32.

  5. Print the converted temperature.

  6. Stop.

Share this Article & Support Us:
Status
printf('Loading...');