From 701183cdef1e4f9c86f749d71cf7654db1b9a7e1 Mon Sep 17 00:00:00 2001 From: Evan Date: Mon, 3 Oct 2022 20:18:16 -0700 Subject: added 1st run of pseudo code --- CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp b/CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp index f877062..0a94e0d 100644 --- a/CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp +++ b/CST116-Ch6-Debugging/CST116-Ch6-Debugging.cpp @@ -43,17 +43,22 @@ using std::endl; int main() { + //defines the terms fahrenheit and celcius float fahrenheit = 0; float celcius = 0; + //requires user input to set a temperature cout << "Enter temperature in Fahrenheit: "; cin >> fahrenheit; // Breakpoint 1 // Put a breakpoint on the following line + + //this is the equation to convert fahrenheit to celcius celcius = (float)(5.0 / 9.0) * (fahrenheit - 32); + //displays the converted temperature in celcius cout << fahrenheit << " degrees in F = " \ << celcius << " degrees in C" << endl; -- cgit v1.2.3