Course Web Pages
Related LinksFree eBooks
|
FunctionsInstructions Yes or No, Part 1 Yes or No, Part 2 Yes or No, Part 3 A Comparison of the Yes or No Project with Random Points ExercisesDownload instructions.cpp. Break this program into three files:
Bonus exerciseAs part of the Instructions project, create two new files called formulas.cpp and a header file formuals.h. The formulas.cpp file should have a function called celsius2fahrenheit. The function should accept a float parameter and return a float. The formulas.h file should go in the include folder where instructions.h is located. Modify main.cpp so you can use the celsius2fahrenheit function. In main.cpp, assign the results of celsius2fahrenheit(0.0f) and celsius2fahrenheit(100.0f) to a variable and print out the result. The formula for converting Celsius into Fahrenheit is: fahrenheit = celsius * 9 / 5 + 32 |