Answered step by step
Verified Expert Solution
Question
1 Approved Answer
/ Question 1: convert to Kelvin Write a C++ function named ConvertFahrenheitToKelvin to convert and return any given Fahrenheit temperature to Kelvin temperature. The formula
/ Question 1: convert to Kelvin Write a C++ function named ConvertFahrenheitToKelvin to convert and return any given Fahrenheit temperature to Kelvin temperature. The formula for the conversion is, K=(F32)5/9+273.15 where K is the Kelvin temperature and F is Fahrenheit temperature. Do the following: 1. Write your algorithm as code comments. (20 points) 2. Implement your function ( 60 points): 2.1 Document what your function does as a code comment. Follow slide 15 of the lesson (5 points) 3. In your main program, test your function for 98.4 and 32 Fahrenheit temperatures respectively in this order. (20 points). / //Replace ... with your code or comment. Hit enter key to get more vertical space / The test cases may fail if you print (std::cout) anything other than expected inside your function. Do it in your IDE if you want to use std::cout for debuging purpose. / // PLAN: //Follow the UMPIRE technique and write your PLAN below. Please comment out your writing. K= kelvin // IMPLEMENT: \#include // Enter your function documentation below. Please comment out your writing. K=(F32)5/9+273.15 double ConvertFahrenheitToKelvin(double fahrenheit_temperature) \{ ...convert ... \} // REVIEW: int main(int argc, char *argv[]) \{ double f_temperature =459.66999999999996; // Print a call to your function. See example below std:: cout ConvertFahrenheitToKelvin(f_temperature) std: : endl; // Print a call to your function for each data point in the order given in the problem statement. // See example above. ... ... return ; \}
Step 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