aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonCr <[email protected]>2022-10-12 17:48:13 -0700
committerJonCr <[email protected]>2022-10-12 17:48:13 -0700
commitc4d29bc1c05b98e12930266bc6a0b6db3262b41c (patch)
tree5dc98a2faa9b1d6cfda41f8987e942441866e2f7
parentSetting up GitHub Classroom Feedback (diff)
downloadcst116-ch6-debugging-cognitiveshadow-main.tar.xz
cst116-ch6-debugging-cognitiveshadow-main.zip
FinishedHEADmain
-rw-r--r--CST116-Ch6-Crombie-pseudo-code.txt6
-rw-r--r--CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp2
-rw-r--r--cst116-Ch6-Crombie.txt8
3 files changed, 15 insertions, 1 deletions
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 . . .
+
+
+