Exercises on Operators and Expression
Apply what you’ve learned so far by getting hands-on practice.
We'll cover the following
For the following questions, do try attempting the problems by yourself before looking at the solutions.
Please ignore the surrounding code that may be unfamiliar at this point. This will become clear as we progress.
Question 1
Write a program that converts temperature in degrees Fahrenheit (oF) to degrees Celsius (oC) using the following formula:
Assume that the temperature in degrees Fahrenheit is given to you in the variable degF
, and the converted value is to be stored in the variable degC
.
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy