Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Using c++ in Vocareum #include using namespace std; int main() { // temperature in degrees Celsius // prompt user to enter a temperature in degrees
Using c++ in Vocareum
#include
using namespace std;
int main() { // temperature in degrees Celsius // prompt user to enter a temperature in degrees Celsius // read in the temperature in degrees Celsius // convert Celsius to Fahrenheit // display temperature in Celsius and Fahrenheit return 0; }
Program Objective Write a program that asks the user to enter a temperature in degrees Celsius, converts the temperature to degrees Fahrenheit, and then displays the temperature in both degrees Celsius and degrees Fahrenheit. Temp in Fahrenheit = (9/5)(Temp in Celsius) + 32 Program Specifications Your program must use variables of type double and with appropriate names. Note that temperatures may be real numbers. Watch out for integer division! For this program, it's OK to hardwire the numbers 9,5 and 32 into your code rather than use constants. Your program must interact with the user and produce output exactly as follows with the exception of the numbers (note the spaces, spelling, punctuation, etc.). Note that any spelling error will result in a grade of zero. The example below shows program output if the user enters a temperature of 23.76 degrees Celsius. Enter a temperature in degrees Celsius: 23.76 23.76 degrees Celsius is 74.768 degrees Fahrenheit. Remember to include an endl after Fahrenheit and note that there is not a space after Fahrenheit. Do NOT format the output numbers. Use the C++ default formatting (i.e. use statements like coutStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started