Back
Code Challenge 1.4 - Celsius to Fahrenheit Calculator
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
Challenge Tasks
-
Create a console application named CelFahrCalculator-LastName
-
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
--- Celsius to Fahrenheit Calculator ---
Enter the temperature in Celsius: 62 [Enter]