From c4d29bc1c05b98e12930266bc6a0b6db3262b41c Mon Sep 17 00:00:00 2001 From: JonCr Date: Wed, 12 Oct 2022 17:48:13 -0700 Subject: Finished --- CST116-Ch6-Crombie-pseudo-code.txt | 6 ++++++ CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp | 2 +- cst116-Ch6-Crombie.txt | 8 ++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 CST116-Ch6-Crombie-pseudo-code.txt create mode 100644 cst116-Ch6-Crombie.txt diff --git a/CST116-Ch6-Crombie-pseudo-code.txt b/CST116-Ch6-Crombie-pseudo-code.txt new file mode 100644 index 0000000..4a5440a --- /dev/null +++ b/CST116-Ch6-Crombie-pseudo-code.txt @@ -0,0 +1,6 @@ +Set fahrenheit equal to 0 +Set Celcius equal to 0 +Display "Enter temperature in Fahrenheit: " +Input fahrenheit +Calculate celsius from fahrenheit +Print value of fahrenheight " degrees F = " value of celcius " degrees C \ No newline at end of file diff --git a/CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp b/CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp index 497e2f8..a4cede0 100644 --- a/CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp +++ b/CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp @@ -51,7 +51,7 @@ int main() // Breakpoint 1 // Put a breakpoint on the following line - celcius = 5 / 9 * fahrenheit - 32; + celcius = 5.0 / 9.0 * (fahrenheit - 32); cout << fahrenheit << " degrees F = " << celcius << " degrees C" << endl; diff --git a/cst116-Ch6-Crombie.txt b/cst116-Ch6-Crombie.txt new file mode 100644 index 0000000..1560eb9 --- /dev/null +++ b/cst116-Ch6-Crombie.txt @@ -0,0 +1,8 @@ +Enter temperature in Fahrenheit: 212 +212 degrees F = 100 degrees C + +C:\Users\JonCr\source\repos\cst116-ch6-debugging-CognitiveShadow1\CST116-Ch6-Debugging\x64\Debug\CST116-Ch6-Debugging.exe (process 2456) exited with code 0. +Press any key to close this window . . . + + + -- cgit v1.2.3