diff options
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 |