aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan <[email protected]>2022-10-03 20:10:59 -0700
committerEvan <[email protected]>2022-10-03 20:10:59 -0700
commit351e2b76c8ce68e74facddb8ae5d624db7a0c968 (patch)
tree93bceccffb483de1b4b3d6f19c8f7b7b476cb1e2
parent2 (diff)
downloadcst116-ch6-debugging-evanmihm-351e2b76c8ce68e74facddb8ae5d624db7a0c968.tar.xz
cst116-ch6-debugging-evanmihm-351e2b76c8ce68e74facddb8ae5d624db7a0c968.zip
remove 2nd temp
-rw-r--r--CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp b/CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp
index dca4259..f877062 100644
--- a/CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp
+++ b/CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp
@@ -51,10 +51,12 @@ int main()
// Breakpoint 1
// Put a breakpoint on the following line
- celcius = 5 / 9 * fahrenheit - 32;
+ celcius = (float)(5.0 / 9.0) * (fahrenheit - 32);
+
+
+ cout << fahrenheit << " degrees in F = " \
+ << celcius << " degrees in C" << endl;
- cout << fahrenheit << " degrees F = "
- << celcius << " degrees C" << endl;
return 0;
} \ No newline at end of file