← 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 project named Challenge 1-4.
- Prompt the user to enter a temperature in Celsius.
- Convert the Celsius value to Fahrenheit using the 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]
62°C is equal to 143.6°F