Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need help with modifying this C++ conversion program. What the program does is

ID: 441592 • Letter: I

Question

I need help with modifying this C++ conversion program. What the program does is it displays a table for the conversion between Celsius and Fahrenheit and vice-versa. I need to modify this program that would instead print a brief message describing what the program does and then prompt the user to enter "1" if they would like to convert a Fahrenheit number to Celsius, or "2" to convert a Celsius number to Fahrenheit. Below is the code I wrote for the original purpose of the program. It would be great if you guys can help me take away the function of displaying the table and replace it with those prompts instead. Thank you! #include int celsius( int fTemp); //function prototype int fahrenheit( int cTemp ); //function prototype int main () { int i; //loop //display table of Fahrenheit equivalents of Celsius 0 to 100 for ( i =0; i <= 100; ++i ) printf( "% %d " , i , fahrenheit ( i ) ); } // end for // display table of Celsius equivalents of Fahrenheit temperature puts( " Celsius equivalents of Fahrenheit temperatures:" ); puts( "Fahrenheit Celsuius" ); //display Celsius equivalents of Fahrenheit 32 to 212 for ( i = 32; i <= 212; ++i ) { printf("%d %d " , 1, celsius( 1 ) ); } //end for } // end main // celsius returns Celsius equivalent of fTemp, given in Fahrenheit int celsius( int fTemp) { return ( int ) ( 5.0 / 9.0 * ( fTemp - 32 ) ); } //end function celsius // fahrenheit returns Fahrenheit equivalent of cTemp, given in Celsius int fahrenheit( int cTemp ) { return ( int ) ( 9.0 / 5.0 * cTemp + 32 ); } //end function fahrenheit

Explanation / Answer

#include using namespace std; int main() { float celsius; float fahrenheit; cout > celsius; fahrenheit = (5/9) * (celsius + 32); cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote