Back

Code Challenge 1.4 - Celsius to Fahrenheit Calculator

divider

Objective

Create a console application that converts a temperature from Celsius to Fahrenheit based on user input.

Skills to Practice

  • Prompting a user for input
  • Saving user input to variables
  • Converting input to the correct data type (if necessary)
  • Performing arithmetic calculations
  • Formatting custom output using variables
divider

Challenge Tasks

  1. Create a console application named CelFahrCalculator-LastName
  2. Complete the following tasks:
    • Prompt the user to enter a temperature in Celsius.
    • Convert the celsius value from the user to the equivalent value in fahrenheit.
    • Formula: F = C × 1.8 + 32
    • Optionally, round the answer to two decimal places.
    • Display the calculated Fahrenheit temperature to the user in a clear and formatted manner.
    • If you want to use the degree symbol in your output, I've provided it here to copy and paste: °

Sample Output

Miles to Kilometers Calculator
--- Celsius to Fahrenheit Calculator ---
Enter the temperature in Celsius: 62 [Enter]
62°C is equal to 143.6°F