Learn

Let’s go back to the temperature.cpp that we wrote. This time, instead of giving tempf a value of the current temperature in New York:

tempf = 83;

Let’s ask the user what the temperature is using cin!

Instructions

1.

Tell the user “Enter the temperature in Fahrenheit: “ using std::cout.

And get their input using std::cin and store it in tempf.

2.

Compile and execute your program using the terminal.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.
Already have an account?