diff options
| author | Evan <[email protected]> | 2022-10-03 20:10:59 -0700 |
|---|---|---|
| committer | Evan <[email protected]> | 2022-10-03 20:10:59 -0700 |
| commit | 351e2b76c8ce68e74facddb8ae5d624db7a0c968 (patch) | |
| tree | 93bceccffb483de1b4b3d6f19c8f7b7b476cb1e2 /CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp | |
| parent | 2 (diff) | |
| download | cst116-ch6-debugging-evanmihm-351e2b76c8ce68e74facddb8ae5d624db7a0c968.tar.xz cst116-ch6-debugging-evanmihm-351e2b76c8ce68e74facddb8ae5d624db7a0c968.zip | |
remove 2nd temp
Diffstat (limited to 'CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp')
| -rw-r--r-- | CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp | 8 |
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 |