aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah Wu <[email protected]>2022-10-11 22:06:23 -0700
committerHannah Wu <[email protected]>2022-10-11 22:06:23 -0700
commitf837997979477aaaad8ca56c6d1da217c735d147 (patch)
tree5354c2b19ca8a586ef198a0c32bc0299be392845
parentFixed main file. Added psuedocode file. Added output text file. (diff)
downloadcst116-ch6-debugging-wu-main.tar.xz
cst116-ch6-debugging-wu-main.zip
Main file updateHEADmain
-rw-r--r--CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp2
-rw-r--r--CST116-Ch6-Debugging/CST116-Ch6-Debugging.txt6
-rw-r--r--CST116-Ch6-Debugging/CST116-Ch6-DebuggingPseudocode.txt7
3 files changed, 14 insertions, 1 deletions
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-Debugging/CST116-Ch6-Debugging.txt b/CST116-Ch6-Debugging/CST116-Ch6-Debugging.txt
new file mode 100644
index 0000000..6198a62
--- /dev/null
+++ b/CST116-Ch6-Debugging/CST116-Ch6-Debugging.txt
@@ -0,0 +1,6 @@
+Enter temperature in Fahrenheit: 212
+212 degrees F = 100 degrees C
+
+C:\Users\hanna\Source\Repos\cst116-ch6-debugging-Wu\CST116-Ch6-Debugging\Debug\CST116-Ch6-Debugging.exe (process 17264) exited with code 0.
+To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
+Press any key to close this window . . . \ No newline at end of file
diff --git a/CST116-Ch6-Debugging/CST116-Ch6-DebuggingPseudocode.txt b/CST116-Ch6-Debugging/CST116-Ch6-DebuggingPseudocode.txt
new file mode 100644
index 0000000..b98c021
--- /dev/null
+++ b/CST116-Ch6-Debugging/CST116-Ch6-DebuggingPseudocode.txt
@@ -0,0 +1,7 @@
+SET FAHRENHEIT=0
+SET CELCIUS=0
+IF INPUT=!0 THEN SET INPUT=N
+ SET FAHRENHEIT = N-32
+ SET CELCIUS = 5.0/9.0
+OUTPUT = CELCIUS*FAHRENHEIT
+PRINT OUTPUT \ No newline at end of file