From 351e2b76c8ce68e74facddb8ae5d624db7a0c968 Mon Sep 17 00:00:00 2001 From: Evan Date: Mon, 3 Oct 2022 20:10:59 -0700 Subject: remove 2nd temp --- CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'CST116-Ch6-Debugging') 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 -- cgit v1.2.3